Skip to content

Commit

Permalink
Trunk format
Browse files Browse the repository at this point in the history
  • Loading branch information
sachaw committed May 20, 2023
1 parent 4195c68 commit 25c319a
Show file tree
Hide file tree
Showing 22 changed files with 301 additions and 387 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
inputs:
increment_type:
type: choice
description: "Select the type of version increment"
description: Select the type of version increment
required: true
options:
- patch
Expand Down
1 change: 1 addition & 0 deletions .trunk/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
plugins
user_trunk.yaml
user.yaml
shims
14 changes: 7 additions & 7 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
version: 0.1
cli:
version: 1.7.0
version: 1.9.1
plugins:
sources:
- id: trunk
ref: v0.0.15
uri: https://github.com/trunk-io/plugins
lint:
enabled:
- yamllint@1.30.0
- buf-lint@1.17.0
- buf-breaking@1.17.0
- yamllint@1.31.0
- buf-lint@1.19.0
- buf-breaking@1.19.0
- [email protected]
- markdownlint@0.33.0
- [email protected].7
- [email protected].2
- markdownlint@0.34.0
- [email protected].8
- [email protected].3
- git-diff-check
runtimes:
enabled:
Expand Down
6 changes: 1 addition & 5 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"recommendations": [
"trunk.io",
"pbkit.vscode-pbkit",
"bufbuild.vscode-buf"
]
"recommendations": ["trunk.io", "pbkit.vscode-pbkit", "bufbuild.vscode-buf"]
}
104 changes: 50 additions & 54 deletions meshtastic/admin.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,29 @@ syntax = "proto3";

package meshtastic;

option java_package = "com.geeksville.mesh";
option java_outer_classname = "AdminProtos";
option go_package = "github.com/meshtastic/go/generated";
option csharp_namespace = "Meshtastic.Protobufs";
option swift_prefix = "";

import "meshtastic/channel.proto";
import "meshtastic/config.proto";
import "meshtastic/mesh.proto";
import "meshtastic/module_config.proto";
import "meshtastic/connection_status.proto";
import "meshtastic/deviceonly.proto";
import "meshtastic/mesh.proto";
import "meshtastic/module_config.proto";

option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "AdminProtos";
option java_package = "com.geeksville.mesh";
option swift_prefix = "";

/*
* This message is handled by the Admin module and is responsible for all settings/channel read/write operations.
* This message is used to do settings operations to both remote AND local nodes.
* (Prior to 1.2 these operations were done via special ToRadio operations)
*/
message AdminMessage {

/*
* TODO: REPLACE
*/
enum ConfigType {

/*
* TODO: REPLACE
*/
Expand Down Expand Up @@ -67,40 +65,39 @@ message AdminMessage {
* TODO: REPLACE
*/
enum ModuleConfigType {

/*
* TODO: REPLACE
*/
* TODO: REPLACE
*/
MQTT_CONFIG = 0;

/*
* TODO: REPLACE
*/
* TODO: REPLACE
*/
SERIAL_CONFIG = 1;

/*
* TODO: REPLACE
*/
* TODO: REPLACE
*/
EXTNOTIF_CONFIG = 2;

/*
* TODO: REPLACE
*/
* TODO: REPLACE
*/
STOREFORWARD_CONFIG = 3;

/*
* TODO: REPLACE
*/
* TODO: REPLACE
*/
RANGETEST_CONFIG = 4;

/*
* TODO: REPLACE
*/
* TODO: REPLACE
*/
TELEMETRY_CONFIG = 5;

/*
* TODO: REPLACE
*/
* TODO: REPLACE
*/
CANNEDMSG_CONFIG = 6;

/*
Expand All @@ -118,36 +115,35 @@ message AdminMessage {
* TODO: REPLACE
*/
oneof payload_variant {

/*
* Send the specified channel in the response to this message
* NOTE: This field is sent with the channel index + 1 (to ensure we never try to send 'zero' - which protobufs treats as not present)
*/
uint32 get_channel_request = 1;

/*
* TODO: REPLACE
*/
* TODO: REPLACE
*/
Channel get_channel_response = 2;

/*
* Send the current owner data in the response to this message.
*/
* Send the current owner data in the response to this message.
*/
bool get_owner_request = 3;

/*
* TODO: REPLACE
*/
* TODO: REPLACE
*/
User get_owner_response = 4;

/*
* Ask for the following config data to be sent
*/
* Ask for the following config data to be sent
*/
ConfigType get_config_request = 5;

/*
* Send the current Config in the response to this message.
*/
* Send the current Config in the response to this message.
*/
Config get_config_response = 6;

/*
Expand Down Expand Up @@ -176,8 +172,8 @@ message AdminMessage {
bool get_device_metadata_request = 12;

/*
* Device metadata response
*/
* Device metadata response
*/
DeviceMetadata get_device_metadata_response = 13;

/*
Expand Down Expand Up @@ -209,10 +205,10 @@ message AdminMessage {
* Get the mesh's nodes with their available gpio pins for RemoteHardware module use
*/
bool get_node_remote_hardware_pins_request = 19;

/*
* Respond with the mesh's nodes with their available gpio pins for RemoteHardware module use
*/
*/
NodeRemoteHardwarePinsResponse get_node_remote_hardware_pins_response = 20;

/*
Expand All @@ -221,12 +217,12 @@ message AdminMessage {
User set_owner = 32;

/*
* Set channels (using the new API).
* A special channel is the "primary channel".
* The other records are secondary channels.
* Note: only one channel can be marked as primary.
* If the client sets a particular channel to be primary, the previous channel will be set to SECONDARY automatically.
*/
* Set channels (using the new API).
* A special channel is the "primary channel".
* The other records are secondary channels.
* Note: only one channel can be marked as primary.
* If the client sets a particular channel to be primary, the previous channel will be set to SECONDARY automatically.
*/
Channel set_channel = 33;

/*
Expand Down Expand Up @@ -254,7 +250,7 @@ message AdminMessage {
* This will delay the standard *implicit* save to the file system and subsequent reboot behavior until committed (commit_edit_settings)
*/
bool begin_edit_settings = 64;

/*
* Commits an open transaction for any edits made to config, module config, owner, and channel settings
*/
Expand Down Expand Up @@ -321,12 +317,12 @@ message HamParameters {
string short_name = 4;
}

/*
/*
* Response envelope for node_remote_hardware_pins
*/
message NodeRemoteHardwarePinsResponse {
/*
/*
* Nodes and their respective remote hardware GPIO pins
*/
repeated NodeRemoteHardwarePin node_remote_hardware_pins = 1;
}
}
14 changes: 6 additions & 8 deletions meshtastic/apponly.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@ syntax = "proto3";

package meshtastic;

option java_package = "com.geeksville.mesh";
option java_outer_classname = "AppOnlyProtos";
option go_package = "github.com/meshtastic/go/generated";
option csharp_namespace = "Meshtastic.Protobufs";
option swift_prefix = "";


import "meshtastic/channel.proto";
import "meshtastic/config.proto";

option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "AppOnlyProtos";
option java_package = "com.geeksville.mesh";
option swift_prefix = "";

/*
* This is the most compact possible representation for a set of channels.
* It includes only one PRIMARY channel (which must be first) and
Expand All @@ -20,7 +19,6 @@ import "meshtastic/config.proto";
* This abstraction is used only on the the 'app side' of the world (ie python, javascript and android etc) to show a group of Channels as a (long) URL
*/
message ChannelSet {

/*
* Channel list with settings
*/
Expand Down
7 changes: 3 additions & 4 deletions meshtastic/cannedmessages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@ syntax = "proto3";

package meshtastic;

option java_package = "com.geeksville.mesh";
option java_outer_classname = "CannedMessageConfigProtos";
option go_package = "github.com/meshtastic/go/generated";
option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "CannedMessageConfigProtos";
option java_package = "com.geeksville.mesh";
option swift_prefix = "";

/*
* Canned message module configuration.
*/
message CannedMessageModuleConfig {

/*
* Predefined messages for canned message module separated by '|' characters.
*/
Expand Down
9 changes: 3 additions & 6 deletions meshtastic/channel.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ syntax = "proto3";

package meshtastic;

option java_package = "com.geeksville.mesh";
option java_outer_classname = "ChannelProtos";
option go_package = "github.com/meshtastic/go/generated";
option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "ChannelProtos";
option java_package = "com.geeksville.mesh";
option swift_prefix = "";

/*
Expand All @@ -26,7 +26,6 @@ option swift_prefix = "";
* explain how remote settings and remote gpio are managed as an example
*/
message ChannelSettings {

/*
* Deprecated in favor of LoraConfig.channel_num
*/
Expand Down Expand Up @@ -88,7 +87,6 @@ message ChannelSettings {
* A pair of a channel number, mode and the (sharable) settings for that channel
*/
message Channel {

/*
* How this channel is being used (or not).
* Note: this field is an enum to give us options for the future.
Expand All @@ -101,7 +99,6 @@ message Channel {
* (but any number of SECONDARY channels can't be sent received on that common frequency)
*/
enum Role {

/*
* This channel is not in use right now
*/
Expand Down
13 changes: 6 additions & 7 deletions meshtastic/clientonly.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ syntax = "proto3";

package meshtastic;

option java_package = "com.geeksville.mesh";
option java_outer_classname = "ClientOnlyProtos";
option go_package = "github.com/meshtastic/go/generated";
import "meshtastic/localonly.proto";

option csharp_namespace = "Meshtastic.Protobufs";
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "ClientOnlyProtos";
option java_package = "com.geeksville.mesh";
option swift_prefix = "";


import "meshtastic/localonly.proto";

/*
* This abstraction is used to contain any configuration for provisioning a node on any client.
* It is useful for importing and exporting configurations.
Expand Down Expand Up @@ -40,4 +39,4 @@ message DeviceProfile {
* The ModuleConfig of the node
*/
optional LocalModuleConfig module_config = 5;
}
}
Loading

0 comments on commit 25c319a

Please sign in to comment.