mirror of https://github.com/arendst/Tasmota.git
Use global struct
This commit is contained in:
parent
0cfe1ac3e1
commit
0d85f5c583
|
@ -955,7 +955,7 @@ void Every250mSeconds(void)
|
||||||
}
|
}
|
||||||
if (!blinkstate) {
|
if (!blinkstate) {
|
||||||
TasmotaGlobal.blinks--;
|
TasmotaGlobal.blinks--;
|
||||||
if (200 == TasmotaGlobal.blinks) TasmotaGlobal.blinks = 0; // Disable blink
|
if (200 == TasmotaGlobal.blinks) { TasmotaGlobal.blinks = 0; } // Disable blink
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Settings.ledstate &1 && (PinUsed(GPIO_LEDLNK) || !(TasmotaGlobal.blinks || TasmotaGlobal.restart_flag || TasmotaGlobal.ota_state_flag)) ) {
|
if (Settings.ledstate &1 && (PinUsed(GPIO_LEDLNK) || !(TasmotaGlobal.blinks || TasmotaGlobal.restart_flag || TasmotaGlobal.ota_state_flag)) ) {
|
||||||
|
|
|
@ -95,7 +95,6 @@ struct {
|
||||||
power_t blink_mask; // Blink relay active mask
|
power_t blink_mask; // Blink relay active mask
|
||||||
|
|
||||||
int serial_in_byte_counter; // Index in receive buffer
|
int serial_in_byte_counter; // Index in receive buffer
|
||||||
int ota_state_flag; // OTA state flag
|
|
||||||
|
|
||||||
float temperature_celsius; // Provide a global temperature to be used by some sensors
|
float temperature_celsius; // Provide a global temperature to be used by some sensors
|
||||||
float humidity; // Provide a global humidity to be used by some sensors
|
float humidity; // Provide a global humidity to be used by some sensors
|
||||||
|
@ -103,6 +102,7 @@ struct {
|
||||||
|
|
||||||
uint8_t blinks; // Number of LED blinks
|
uint8_t blinks; // Number of LED blinks
|
||||||
uint8_t restart_flag; // Tasmota restart flag
|
uint8_t restart_flag; // Tasmota restart flag
|
||||||
|
uint8_t ota_state_flag; // OTA state flag
|
||||||
uint8_t wifi_state_flag; // Wifi state flag
|
uint8_t wifi_state_flag; // Wifi state flag
|
||||||
|
|
||||||
} TasmotaGlobal;
|
} TasmotaGlobal;
|
||||||
|
|
Loading…
Reference in New Issue