Fix typedef struct compiler warning

This commit is contained in:
Theo Arends committed 2026-10-03 16:10:42 +02:00
1 parent 952f5c8f91
commit ab38e799a0
11 files changed
+64 -62

No files matched your search

+2 -2
View File
@@ -462,8 +462,8 @@ typedef struct {
} EnergyUsage;
typedef struct {
uint8_t fnid = 0;
uint8_t dpid = 0;
uint8_t fnid;
uint8_t dpid;
} TuyaFnidDpidMap;
typedef union {
@@ -39,18 +39,18 @@
typedef struct {
// metrics
uint32_t packet_received = 0;
uint32_t packet_accepted = 0;
uint32_t strip_refresh = 0;
uint16_t offs = 0; // offset in the led strip where the matrix starts (min: 0)
uint16_t univ = 0; // start at universe number (+1)
uint16_t port = 6454; // UDP port number
uint8_t dimm = 100; // Dimmer 0..100
uint8_t rows = 1; // number of rows (min:1)
uint8_t cols = 0; // number of columns (if cols == 0 then apply to the entire light)
bool alt = false; // are the rows in alternate directions
bool on = true;
bool matrix = true; // true if light is a WS2812 matrix, false if single light
uint32_t packet_received;
uint32_t packet_accepted;
uint32_t strip_refresh;
uint16_t offs; // offset in the led strip where the matrix starts (min: 0)
uint16_t univ; // start at universe number (+1)
uint16_t port; // UDP port number
uint8_t dimm; // Dimmer 0..100
uint8_t rows; // number of rows (min:1)
uint8_t cols; // number of columns (if cols == 0 then apply to the entire light)
bool alt; // are the rows in alternate directions
bool on;
bool matrix; // true if light is a WS2812 matrix, false if single light
} ArtNetConfig;
uint32_t * packets_per_row = nullptr;
@@ -32,12 +32,12 @@ typedef struct Z_CommandConverter {
} Z_CommandConverter;
typedef struct Z_XYZ_Var { // Holds values for vairables X, Y and Z
uint32_t x = 0;
uint32_t y = 0;
uint32_t z = 0;
uint8_t x_type = 0; // 0 = no value, 1 = 1 bytes, 2 = 2 bytes
uint8_t y_type = 0;
uint8_t z_type = 0;
uint32_t x;
uint32_t y;
uint32_t z;
uint8_t x_type; // 0 = no value, 1 = 1 bytes, 2 = 2 bytes
uint8_t y_type;
uint8_t z_type;
} Z_XYZ_Var;
// Cluster specific commands
@@ -60,19 +60,19 @@ TasmotaSerial *ExsSerial = nullptr;
typedef struct
{
uint8_t on = 0;
uint8_t bright_tbl = 0;
uint8_t dimm = 0;
uint8_t impuls_start = 0;
uint32_t impuls_len = 0;
uint8_t on;
uint8_t bright_tbl;
uint8_t dimm;
uint8_t impuls_start;
uint32_t impuls_len;
} CHANNEL;
typedef struct
{
uint8_t version_major = 0;
uint8_t version_minor = 0;
uint8_t version_major;
uint8_t version_minor;
CHANNEL channel[2];
uint8_t gate_lock = 0;
uint8_t gate_lock;
} DIMMER;
struct EXS
@@ -64,27 +64,29 @@ typedef struct {
String chat_id;
// String from_first_name;
// String from_last_name;
// uint32_t from_id = 0;
uint32_t update_id = 0;
// uint32_t from_id;
uint32_t update_id;
} TelegramMessage;
typedef struct {
TelegramMessage message[TELEGRAM_MAX_MESSAGES];
uint8_t fingerprint[20];
uint32_t next_update_id = 0;
uint8_t message_count = 0; // Amount of messages read per time
uint8_t state = 0;
uint8_t index = 0;
uint8_t retry = 0;
uint8_t poll = TELEGRAM_LOOP_WAIT;
uint8_t wait = 0;
bool recv_busy = false;
bool skip = true; // Skip first telegram if restarted
uint32_t next_update_id;
uint8_t message_count; // Amount of messages read per time
uint8_t state;
uint8_t index;
uint8_t retry;
uint8_t poll;
uint8_t wait;
bool recv_busy;
bool skip; // Skip first telegram if restarted
} Telegram_t;
Telegram_t* Telegram = nullptr;
void TelegramInit(void) {
Telegram = (Telegram_t*)calloc(sizeof(Telegram_t), 1); // Need calloc to reset registers to 0/false
Telegram->poll = TELEGRAM_LOOP_WAIT;
Telegram->skip = true;
}
bool TelegramStart(void) {
@@ -75,12 +75,12 @@ TasmotaSerial *ShdSerial = nullptr;
typedef struct
{
uint8_t version_major = 0;
uint8_t version_minor = 0;
uint8_t version_major;
uint8_t version_minor;
uint32_t brightness = 0;
uint32_t power = 0;
uint32_t fade_rate = 0;
uint32_t brightness;
uint32_t power;
uint32_t fade_rate;
} SHD_DIMMER;
struct SHD
@@ -54,15 +54,15 @@ enum TS_Gesture {
};
typedef struct TSGlobal_t {
int16_t raw_touch_xp = 0;
int16_t raw_touch_yp = 0;
int16_t touch_xp = 0;
int16_t touch_yp = 0;
uint8_t touches = 0; // number of touches for multi-touch
uint8_t gesture = 0; // gesture code
int16_t raw_touch_xp;
int16_t raw_touch_yp;
int16_t touch_xp;
int16_t touch_yp;
uint8_t touches; // number of touches for multi-touch
uint8_t gesture; // gesture code
// multi-point is not yet supported
bool touched = false;
bool external_ts = false;
bool touched;
bool external_ts;
} TSGlobal_t;
TSGlobal_t TSGlobal;
@@ -141,9 +141,9 @@ void (*const DrvRgxCommand[])(void) PROGMEM = {
typedef struct
{
uint8_t status = RGX_NOT_CONFIGURED;
uint8_t status;
#ifdef USE_WIFI_RANGE_EXTENDER_NAPT
bool napt_enabled = false;
bool napt_enabled;
#endif // USE_WIFI_RANGE_EXTENDER_NAPT
} TRgxSettings;
@@ -66,7 +66,7 @@ typedef struct wooliis_data_t {
float energy_in;
float energy_out;
uint8_t status;
uint8_t valid = 0;
uint8_t valid;
uint8_t charge_percent;
} wooliis_data_t;
@@ -297,12 +297,12 @@ typedef struct gesture_data_type {
} gesture_data_t;
typedef struct gesture_type {
int16_t ud_delta_ = 0;
int16_t lr_delta_ = 0;
int16_t ud_count_ = 0;
int16_t lr_count_ = 0;
int16_t state_ = 0;
int16_t motion_ = DIR_NONE;
int16_t ud_delta_;
int16_t lr_delta_;
int16_t ud_count_;
int16_t lr_count_;
int16_t state_;
int16_t motion_;
} gesture_t;
#endif // USE_APDS9960_GESTURE
@@ -96,7 +96,7 @@ typedef struct Ina226Info_tag {
uint8_t address;
uint16_t calibrationValue;
uint16_t config;
uint8_t present : 1;
uint8_t present;
float i_lsb;
float vbus_lsb;
} Ina226Info_t;