[battery] move battery update to the end of the sequence

If we don't have enough power to run *and* charge the battery then at least
some charging will be done bfore a power reset
main-solar-only
Richard Meadows 2016-04-26 09:16:16 +01:00
rodzic 4aa377c269
commit 7b985a2593
2 zmienionych plików z 3 dodań i 6 usunięć

Wyświetl plik

@ -30,7 +30,6 @@
#include "hw_config.h"
#include "analogue.h"
#include "barometer.h"
#include "battery.h"
#include "gps.h"
#include "ubx_messages.h"
#include "telemetry.h"
@ -110,11 +109,6 @@ struct tracker_datapoint* collect_data(void)
datapoint.bmp180_temperature = (float)b->temperature;
#endif
/**
* ---- Battery ----
*/
update_battery(&datapoint);
#ifdef GPS_TYPE_UBX
/**
* ---- GPS UBX ----

Wyświetl plik

@ -146,4 +146,7 @@ void run_sequencer(uint32_t n, uint32_t cycle_time_s)
record_backlog(dp);
}
}
/* Battery */
update_battery(dp);
}