2020-12-28 05:12:14 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
option java_package = "com.geeksville.mesh";
|
|
|
|
option optimize_for = LITE_RUNTIME;
|
2021-05-24 00:31:38 +00:00
|
|
|
option go_package = "github.com/meshtastic/gomeshproto";
|
2020-12-28 05:12:14 +00:00
|
|
|
|
|
|
|
import "mesh.proto";
|
2021-02-27 05:16:43 +00:00
|
|
|
import "channel.proto";
|
2021-03-11 09:50:36 +00:00
|
|
|
import "radioconfig.proto";
|
2020-12-28 05:12:14 +00:00
|
|
|
|
2021-02-27 05:43:36 +00:00
|
|
|
option java_outer_classname = "DeviceOnly";
|
|
|
|
|
2021-04-20 09:08:28 +00:00
|
|
|
/*
|
|
|
|
* This is a stub version of the old 1.1 representation of RadioConfig.
|
|
|
|
* But only keeping the region info.
|
|
|
|
* The device firmware uses this stub while migrating old nodes to the new preferences system.
|
|
|
|
*/
|
2021-03-11 09:50:36 +00:00
|
|
|
message LegacyRadioConfig {
|
|
|
|
message LegacyPreferences {
|
2021-04-20 09:08:28 +00:00
|
|
|
|
2021-03-11 09:50:36 +00:00
|
|
|
/*
|
2021-04-20 09:08:28 +00:00
|
|
|
* The region code for my radio (US, CN, EU433, etc...)
|
|
|
|
*/
|
2021-03-11 09:50:36 +00:00
|
|
|
RegionCode region = 15;
|
|
|
|
}
|
|
|
|
|
|
|
|
LegacyPreferences preferences = 1;
|
|
|
|
}
|
|
|
|
|
2021-01-29 02:11:10 +00:00
|
|
|
/*
|
|
|
|
* This message is never sent over the wire, but it is used for serializing DB
|
|
|
|
* state to flash in the device code
|
|
|
|
* FIXME, since we write this each time we enter deep sleep (and have infinite
|
|
|
|
* flash) it would be better to use some sort of append only data structure for
|
|
|
|
* the receive queue and use the preferences store for the other stuff
|
|
|
|
*/
|
2020-12-28 05:12:14 +00:00
|
|
|
message DeviceState {
|
2021-03-03 01:37:50 +00:00
|
|
|
|
2021-03-07 08:28:48 +00:00
|
|
|
/*
|
|
|
|
* Was secondary_channels before 1.2
|
|
|
|
*/
|
2021-03-03 01:37:50 +00:00
|
|
|
reserved 12;
|
|
|
|
|
2021-04-20 09:08:28 +00:00
|
|
|
/*
|
|
|
|
* Moved to its own file, but we keep this here so we can automatically migrate old radio.region settings
|
|
|
|
*/
|
2021-03-11 09:50:36 +00:00
|
|
|
LegacyRadioConfig legacyRadio = 1;
|
2020-12-28 05:12:14 +00:00
|
|
|
|
2021-01-29 02:11:10 +00:00
|
|
|
/*
|
|
|
|
* Read only settings/info about this node
|
|
|
|
*/
|
2020-12-28 05:12:14 +00:00
|
|
|
MyNodeInfo my_node = 2;
|
|
|
|
|
2021-01-29 02:11:10 +00:00
|
|
|
/*
|
|
|
|
* My owner info
|
|
|
|
*/
|
2020-12-28 05:12:14 +00:00
|
|
|
User owner = 3;
|
|
|
|
|
|
|
|
repeated NodeInfo node_db = 4;
|
|
|
|
|
2021-01-29 02:11:10 +00:00
|
|
|
/*
|
|
|
|
* Received packets saved for delivery to the phone
|
|
|
|
*/
|
2020-12-28 05:12:14 +00:00
|
|
|
repeated MeshPacket receive_queue = 5;
|
|
|
|
|
2021-01-29 02:11:10 +00:00
|
|
|
/*
|
|
|
|
* A version integer used to invalidate old save files when we make
|
|
|
|
* incompatible changes This integer is set at build time and is private to
|
|
|
|
* NodeDB.cpp in the device code.
|
|
|
|
*/
|
2020-12-28 05:12:14 +00:00
|
|
|
uint32 version = 8;
|
|
|
|
|
2021-01-29 02:11:10 +00:00
|
|
|
/*
|
|
|
|
* We keep the last received text message (only) stored in the device flash,
|
|
|
|
* so we can show it on the screen.
|
|
|
|
* Might be null
|
|
|
|
*/
|
2020-12-28 05:12:14 +00:00
|
|
|
MeshPacket rx_text_message = 7;
|
|
|
|
|
2021-01-29 02:11:10 +00:00
|
|
|
/*
|
2021-04-20 09:08:28 +00:00
|
|
|
* Used only during development.
|
|
|
|
* Indicates developer is testing and changes should never be saved to flash.
|
2021-01-29 02:11:10 +00:00
|
|
|
*/
|
2020-12-28 05:12:14 +00:00
|
|
|
bool no_save = 9;
|
|
|
|
|
2021-01-29 02:11:10 +00:00
|
|
|
/*
|
|
|
|
* Some GPSes seem to have bogus settings from the factory, so we always do one factory reset.
|
|
|
|
*/
|
2020-12-28 05:12:14 +00:00
|
|
|
bool did_gps_reset = 11;
|
2021-03-11 05:01:22 +00:00
|
|
|
}
|
|
|
|
|
2021-04-20 09:08:28 +00:00
|
|
|
/*
|
|
|
|
* The on-disk saved channels
|
|
|
|
*/
|
2021-03-11 05:01:22 +00:00
|
|
|
message ChannelFile {
|
2021-01-29 02:11:10 +00:00
|
|
|
/*
|
2021-02-16 07:41:05 +00:00
|
|
|
* The channels our node knows about
|
2021-01-29 02:11:10 +00:00
|
|
|
*/
|
2021-03-11 05:01:22 +00:00
|
|
|
repeated Channel channels = 1;
|
2020-12-28 05:12:14 +00:00
|
|
|
}
|