mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-30 17:07:16 +02:00
Disable unnecessary scheduler
This commit is contained in:
@ -119,15 +119,16 @@ static void setMeasurementMaxPeriod();
|
|||||||
static void offlineStorageUpdate();
|
static void offlineStorageUpdate();
|
||||||
|
|
||||||
AgSchedule dispLedSchedule(DISP_UPDATE_INTERVAL, updateDisplayAndLedBar);
|
AgSchedule dispLedSchedule(DISP_UPDATE_INTERVAL, updateDisplayAndLedBar);
|
||||||
AgSchedule configSchedule(SERVER_CONFIG_SYNC_INTERVAL,
|
// AgSchedule configSchedule(SERVER_CONFIG_SYNC_INTERVAL,
|
||||||
configurationUpdateSchedule);
|
// configurationUpdateSchedule);
|
||||||
AgSchedule agApiPostSchedule(SERVER_SYNC_INTERVAL, sendDataToServer);
|
// AgSchedule agApiPostSchedule(SERVER_SYNC_INTERVAL, sendDataToServer);
|
||||||
AgSchedule co2Schedule(SENSOR_CO2_UPDATE_INTERVAL, co2Update);
|
AgSchedule co2Schedule(SENSOR_CO2_UPDATE_INTERVAL, co2Update);
|
||||||
AgSchedule pmsSchedule(SENSOR_PM_UPDATE_INTERVAL, updatePm);
|
AgSchedule pmsSchedule(SENSOR_PM_UPDATE_INTERVAL, updatePm);
|
||||||
AgSchedule tempHumSchedule(SENSOR_TEMP_HUM_UPDATE_INTERVAL, tempHumUpdate);
|
AgSchedule tempHumSchedule(SENSOR_TEMP_HUM_UPDATE_INTERVAL, tempHumUpdate);
|
||||||
AgSchedule tvocSchedule(SENSOR_TVOC_UPDATE_INTERVAL, updateTvoc);
|
AgSchedule tvocSchedule(SENSOR_TVOC_UPDATE_INTERVAL, updateTvoc);
|
||||||
AgSchedule watchdogFeedSchedule(60000, wdgFeedUpdate);
|
AgSchedule watchdogFeedSchedule(60000, wdgFeedUpdate);
|
||||||
AgSchedule offlineStorage(60000, offlineStorageUpdate);
|
AgSchedule offlineStorage(60000, offlineStorageUpdate);
|
||||||
|
// AgSchedule checkForUpdateSchedule(FIRMWARE_CHECK_FOR_UPDATE_MS, firmwareCheckForUpdate);
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
/** Serial for print debug message */
|
/** Serial for print debug message */
|
||||||
@ -219,11 +220,11 @@ void setup() {
|
|||||||
// ota not supported
|
// ota not supported
|
||||||
#else
|
#else
|
||||||
firmwareCheckForUpdate();
|
firmwareCheckForUpdate();
|
||||||
checkForUpdateSchedule.update();
|
// checkForUpdateSchedule.update();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
apiClient.fetchServerConfiguration();
|
apiClient.fetchServerConfiguration();
|
||||||
configSchedule.update();
|
// configSchedule.update();
|
||||||
if (apiClient.isFetchConfigureFailed()) {
|
if (apiClient.isFetchConfigureFailed()) {
|
||||||
if (ag->isOne()) {
|
if (ag->isOne()) {
|
||||||
if (apiClient.isNotAvailableOnDashboard()) {
|
if (apiClient.isNotAvailableOnDashboard()) {
|
||||||
@ -272,6 +273,8 @@ void setup() {
|
|||||||
void loop() {
|
void loop() {
|
||||||
/** Handle schedule */
|
/** Handle schedule */
|
||||||
dispLedSchedule.run();
|
dispLedSchedule.run();
|
||||||
|
// configSchedule.run();
|
||||||
|
// agApiPostSchedule.run();
|
||||||
offlineStorage.run();
|
offlineStorage.run();
|
||||||
|
|
||||||
if (configuration.hasSensorS8) {
|
if (configuration.hasSensorS8) {
|
||||||
@ -318,7 +321,7 @@ void loop() {
|
|||||||
configUpdateHandle();
|
configUpdateHandle();
|
||||||
|
|
||||||
/** Firmware check for update handle */
|
/** Firmware check for update handle */
|
||||||
checkForUpdateSchedule.run();
|
// checkForUpdateSchedule.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void co2Update(void) {
|
static void co2Update(void) {
|
||||||
|
Reference in New Issue
Block a user