Added new Detection module for easier detection of state changes

pull/381/head
Ben Meadors 2023-08-13 06:43:07 -05:00
rodzic 6320d6795e
commit 9e9ffc5c05
4 zmienionych plików z 64 dodań i 4 usunięć

Wyświetl plik

@ -119,6 +119,11 @@ message AdminMessage {
* TODO: REPLACE
*/
AMBIENTLIGHTING_CONFIG = 10;
/*
* TODO: REPLACE
*/
DETECTION_CONFIG = 11;
}
/*

Wyświetl plik

@ -111,10 +111,20 @@ message LocalModuleConfig {
*/
ModuleConfig.NeighborInfoConfig neighbor_info = 11;
/*
* The part of the config that is specific to the Neighbor Info module
*/
ModuleConfig.AmbientLightingConfig ambient_lighting = 12;
/*
* The part of the config that is specific to the Neighbor Info module
*/
ModuleConfig.DetectionConfig detection = 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;
}
}

Wyświetl plik

@ -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
*DetectionConfig.monitor_pin int_size:8
*DetectionConfig.name max_size:20

Wyświetl plik

@ -108,6 +108,45 @@ message ModuleConfig {
uint32 update_interval = 2;
}
/*
* Detection Module Config
*/
message DetectionConfig {
/*
* Whether the Module is enabled
*/
bool enabled = 1;
/*
* Interval in seconds of how often we can send a message, if a state change is detected
*/
uint32 minumum_update_interval = 2;
/*
* GPIO pin to monitor for state changes
*/
uint32 monitor_pin = 3;
/*
* Whether or not the GPIO pin state detection is triggered on HIGH (1)
* Otherwise LOW (0)
*/
bool detection_triggered_high = 4;
/*
* Send ASCII bell with alert message
* Useful for trigger ext. notification on bell
*/
bool send_bell = 5;
/*
* 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 = 6;
}
/*
* Audio Config for codec2 voice
*/
@ -614,9 +653,12 @@ message ModuleConfig {
* TODO: REPLACE
*/
AmbientLightingConfig ambient_lighting = 11;
/*
* TODO: REPLACE
*/
DetectionConfig detection = 12;
}
}
/*