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