kopia lustrzana https://github.com/meshtastic/protobufs
Merge pull request #381 from meshtastic/detection-module
New Detection Sensor module for messaging the mesh on detected state changespull/382/head
commit
dc28ae3d12
|
|
@ -119,6 +119,11 @@ message AdminMessage {
|
|||
* TODO: REPLACE
|
||||
*/
|
||||
AMBIENTLIGHTING_CONFIG = 10;
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
DETECTIONSENSOR_CONFIG = 11;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ message Config {
|
|||
uint32 broadcast_smart_minimum_distance = 10;
|
||||
|
||||
/*
|
||||
* The minumum number of seconds (since the last send) before we can send a position to the mesh if position_broadcast_smart_enabled
|
||||
* The minimum number of seconds (since the last send) before we can send a position to the mesh if position_broadcast_smart_enabled
|
||||
*/
|
||||
uint32 broadcast_smart_minimum_interval_secs = 11;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,10 +111,20 @@ message LocalModuleConfig {
|
|||
*/
|
||||
ModuleConfig.NeighborInfoConfig neighbor_info = 11;
|
||||
|
||||
/*
|
||||
* The part of the config that is specific to the Ambient Lighting module
|
||||
*/
|
||||
ModuleConfig.AmbientLightingConfig ambient_lighting = 12;
|
||||
|
||||
/*
|
||||
* The part of the config that is specific to the Detection Sensor module
|
||||
*/
|
||||
ModuleConfig.DetectionSensorConfig detection_sensor = 13;
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
uint32 version = 8;
|
||||
}
|
||||
}
|
||||
|
|
@ -1094,7 +1094,7 @@ enum CriticalErrorCode {
|
|||
TRANSMIT_FAILED = 8;
|
||||
|
||||
/*
|
||||
* We detected that the main CPU voltage dropped below the minumum acceptable value
|
||||
* We detected that the main CPU voltage dropped below the minimum acceptable value
|
||||
*/
|
||||
BROWNOUT = 9;
|
||||
|
||||
|
|
|
|||
|
|
@ -22,4 +22,7 @@
|
|||
*AmbientLightingConfig.current int_size:8
|
||||
*AmbientLightingConfig.red int_size:8
|
||||
*AmbientLightingConfig.green int_size:8
|
||||
*AmbientLightingConfig.blue int_size:8
|
||||
*AmbientLightingConfig.blue int_size:8
|
||||
|
||||
*DetectionSensorConfig.monitor_pin int_size:8
|
||||
*DetectionSensorConfig.name max_size:20
|
||||
|
|
@ -108,6 +108,57 @@ message ModuleConfig {
|
|||
uint32 update_interval = 2;
|
||||
}
|
||||
|
||||
/*
|
||||
* Detection Sensor Module Config
|
||||
*/
|
||||
message DetectionSensorConfig {
|
||||
/*
|
||||
* Whether the Module is enabled
|
||||
*/
|
||||
bool enabled = 1;
|
||||
|
||||
/*
|
||||
* Interval in seconds of how often we can send a message to the mesh when a state change is detected
|
||||
*/
|
||||
uint32 minimum_broadcast_secs = 2;
|
||||
|
||||
/*
|
||||
* Interval in seconds of how often we should send a message to the mesh with the current state regardless of changes
|
||||
* When set to 0, only state changes will be broadcasted
|
||||
* Works as a sort of status heartbeat for peace of mind
|
||||
*/
|
||||
uint32 state_broadcast_secs = 3;
|
||||
/*
|
||||
* Send ASCII bell with alert message
|
||||
* Useful for triggering ext. notification on bell
|
||||
*/
|
||||
bool send_bell = 4;
|
||||
|
||||
/*
|
||||
* Friendly name used to format message sent to mesh
|
||||
* Example: A name "Motion" would result in a message "Motion detected"
|
||||
* Maximum length of 20 characters
|
||||
*/
|
||||
string name = 5;
|
||||
|
||||
/*
|
||||
* GPIO pin to monitor for state changes
|
||||
*/
|
||||
uint32 monitor_pin = 6;
|
||||
|
||||
/*
|
||||
* Whether or not the GPIO pin state detection is triggered on HIGH (1)
|
||||
* Otherwise LOW (0)
|
||||
*/
|
||||
bool detection_triggered_high = 7;
|
||||
|
||||
/*
|
||||
* Whether or not use INPUT_PULLUP mode for GPIO pin
|
||||
* Only applicable if the board uses pull-up resistors on the pin
|
||||
*/
|
||||
bool use_pullup = 8;
|
||||
}
|
||||
|
||||
/*
|
||||
* Audio Config for codec2 voice
|
||||
*/
|
||||
|
|
@ -614,9 +665,12 @@ message ModuleConfig {
|
|||
* TODO: REPLACE
|
||||
*/
|
||||
AmbientLightingConfig ambient_lighting = 11;
|
||||
|
||||
/*
|
||||
* TODO: REPLACE
|
||||
*/
|
||||
DetectionSensorConfig detection_sensor = 12;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue