Moved battery measurement
This commit is contained in:
@@ -131,10 +131,6 @@ int main(void) {
|
||||
static void send_message() {
|
||||
int16_t retcode;
|
||||
|
||||
#if MBED_CONF_APP_BATTERY_ENABLED && MBED_CONF_APP_BATTERY_IN_LPP
|
||||
cayenne.addAnalogInput(MBED_CONF_APP_BATTERY_LPP_ID, battery_voltage());
|
||||
#endif
|
||||
|
||||
#if MBED_CONF_APP_DHT_ENABLED
|
||||
int err = dht.read();
|
||||
if(err == DHT::SUCCESS) {
|
||||
@@ -153,6 +149,10 @@ static void send_message() {
|
||||
loadcell.powerDown();
|
||||
#endif
|
||||
|
||||
#if MBED_CONF_APP_BATTERY_ENABLED && MBED_CONF_APP_BATTERY_IN_LPP
|
||||
cayenne.addAnalogInput(MBED_CONF_APP_BATTERY_LPP_ID, battery_voltage());
|
||||
#endif
|
||||
|
||||
// No data to send
|
||||
if(cayenne.getSize() == 0) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user