Merge branch 'master' into TestAdrien

This commit is contained in:
Adrien 2022-01-30 17:18:57 +01:00
commit 67dedaff3f
2 changed files with 15 additions and 1 deletions

View File

@ -119,7 +119,10 @@ void OBP60Init(GwApi *api){
GwLog *logger=api->getLogger(); GwLog *logger=api->getLogger();
// Define timer interrupts // Define timer interrupts
Timer1.attach_ms(1, underVoltageDetection); // Maximum speed with 1ms bool uvoltage = api->getConfig()->getConfigItem(api->getConfig()->underVoltage,true)->asBoolean();
if(uvoltage == true){
Timer1.attach_ms(1, underVoltageDetection); // Maximum speed with 1ms
}
Timer2.attach_ms(40, readKeypad); // Timer value nust grater than 30ms Timer2.attach_ms(40, readKeypad); // Timer value nust grater than 30ms
Timer3.attach_ms(500, blinkingFlashLED); Timer3.attach_ms(500, blinkingFlashLED);

View File

@ -285,6 +285,17 @@
"obp60":"true" "obp60":"true"
} }
}, },
{
"name": "underVoltage",
"label": "Undervoltage",
"type": "boolean",
"default": "false",
"description": "If undervoltage detection [on|off] lower than 9V then switch off the device",
"category": "OBP60 Hardware",
"capabilities": {
"obp60":"true"
}
},
{ {
"name": "useSimuData", "name": "useSimuData",
"label": "Simulation Data", "label": "Simulation Data",