Change r_device.fields to constant pointer ()

Allows for static "output_fields" to be stored in readonly memory on embedded architectures.
This commit is contained in:
obones 2023-03-13 16:01:29 +01:00 committed by GitHub
parent 2a9ce36123
commit ecb0b361ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
217 changed files with 240 additions and 235 deletions

View file

@ -71,7 +71,7 @@ typedef struct r_device {
struct r_device *(*create_fn)(char *args); struct r_device *(*create_fn)(char *args);
unsigned priority; ///< Run later and only if no previous events were produced unsigned priority; ///< Run later and only if no previous events were produced
unsigned disabled; ///< 0: default enabled, 1: default disabled, 2: disabled, 3: disabled and hidden unsigned disabled; ///< 0: default enabled, 1: default disabled, 2: disabled, 3: disabled and hidden
char const **fields; ///< List of fields this decoder produces; required for CSV output. NULL-terminated. char const *const *fields; ///< List of fields this decoder produces; required for CSV output. NULL-terminated.
/* public for each decoder */ /* public for each decoder */
int verbose; int verbose;

View file

@ -81,7 +81,7 @@ static int abmt_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"temperature_C", "temperature_C",

View file

@ -132,7 +132,7 @@ int const acurite_5n1_winddirections[] = {
// 11 = A // 11 = A
static char const *acurite_getChannel(uint8_t byte) static char const *acurite_getChannel(uint8_t byte)
{ {
static char const *channel_strs[] = {"C", "E", "B", "A"}; // 'E' stands for error static char const *const channel_strs[] = {"C", "E", "B", "A"}; // 'E' stands for error
int channel = (byte & 0xC0) >> 6; int channel = (byte & 0xC0) >> 6;
return channel_strs[channel]; return channel_strs[channel];
@ -1861,7 +1861,7 @@ static int acurite_00275rm_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return result; return result;
} }
static char const *acurite_rain_gauge_output_fields[] = { static char const *const acurite_rain_gauge_output_fields[] = {
"model", "model",
"id", "id",
"rain_mm", "rain_mm",
@ -1880,7 +1880,7 @@ r_device const acurite_rain_896 = {
.fields = acurite_rain_gauge_output_fields, .fields = acurite_rain_gauge_output_fields,
}; };
static char const *acurite_th_output_fields[] = { static char const *const acurite_th_output_fields[] = {
"model", "model",
"id", "id",
"battery_ok", "battery_ok",
@ -1906,7 +1906,7 @@ r_device const acurite_th = {
* For Acurite 592 TXR Temp/Humidity, but * For Acurite 592 TXR Temp/Humidity, but
* Should match Acurite 592TX, 5-n-1, etc. * Should match Acurite 592TX, 5-n-1, etc.
*/ */
static char const *acurite_txr_output_fields[] = { static char const *const acurite_txr_output_fields[] = {
"model", "model",
"message_type", // TODO: remove this "message_type", // TODO: remove this
"id", "id",
@ -1957,7 +1957,7 @@ r_device const acurite_txr = {
* A transmission consists of two packets that run into each other. * A transmission consists of two packets that run into each other.
* There should be 40 bits of data though. But the last bit can't be detected. * There should be 40 bits of data though. But the last bit can't be detected.
*/ */
static char const *acurite_986_output_fields[] = { static char const *const acurite_986_output_fields[] = {
"model", "model",
"id", "id",
"channel", "channel",
@ -1986,7 +1986,7 @@ r_device const acurite_986 = {
* *
*/ */
static char const *acurite_606_output_fields[] = { static char const *const acurite_606_output_fields[] = {
"model", "model",
"id", "id",
"battery_ok", "battery_ok",
@ -1995,7 +1995,7 @@ static char const *acurite_606_output_fields[] = {
NULL, NULL,
}; };
static char const *acurite_590_output_fields[] = { static char const *const acurite_590_output_fields[] = {
"model", "model",
"id", "id",
"battery_ok", "battery_ok",
@ -2023,7 +2023,7 @@ r_device const acurite_606 = {
.fields = acurite_606_output_fields, .fields = acurite_606_output_fields,
}; };
static char const *acurite_00275rm_output_fields[] = { static char const *const acurite_00275rm_output_fields[] = {
"model", "model",
"subtype", "subtype",
"id", "id",

View file

@ -114,7 +114,7 @@ static int acurite_01185m_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return result; return result;
} }
static char const *acurite_01185m_output_fields[] = { static char const *const acurite_01185m_output_fields[] = {
"model", "model",
"id", "id",
"channel", "channel",

View file

@ -62,7 +62,7 @@ static int akhan_rke_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"data", "data",

View file

@ -208,7 +208,7 @@ static int alectov1_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return DECODE_FAIL_SANITY; return DECODE_FAIL_SANITY;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"channel", "channel",

View file

@ -157,7 +157,7 @@ static int ambient_weather_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return ret; return ret;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"channel", "channel",

View file

@ -118,7 +118,7 @@ static int ambientweather_tx8300_callback(r_device *decoder, bitbuffer_t *bitbuf
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"channel", "channel",

View file

@ -356,7 +356,7 @@ static int ambientweather_whx_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return events; return events;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"channel", "channel",

View file

@ -139,7 +139,7 @@ static int ant_antplus_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"network", "network",
"channel", "channel",

View file

@ -212,7 +212,7 @@ static int archos_tbh_decode(r_device *decoder, bitbuffer_t *bitbuffer)
} }
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"battery_ok", "battery_ok",

View file

@ -119,7 +119,7 @@ static int atech_ws308_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"temperature_C", "temperature_C",

View file

@ -77,7 +77,7 @@ static int auriol_4ld5661_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return ret; return ret;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"battery_ok", "battery_ok",

View file

@ -137,7 +137,7 @@ static int auriol_aft77_b2_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"temperature_C", "temperature_C",

View file

@ -105,7 +105,7 @@ static int auriol_afw2a1_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"channel", "channel",

View file

@ -96,7 +96,7 @@ static int auriol_ahfl_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"channel", "channel",

View file

@ -89,7 +89,7 @@ static int auriol_hg02832_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"channel", "channel",

View file

@ -138,7 +138,7 @@ static int badger_orion_decode(r_device *decoder, bitbuffer_t *bitbuffer)
} }
// Note: At this time the exact meaning of the flags is not known. // Note: At this time the exact meaning of the flags is not known.
static char const *badger_output_fields[] = { static char const *const badger_output_fields[] = {
"model", "model",
"id", "id",
"flags_1", "flags_1",

View file

@ -85,7 +85,7 @@ static int baldr_rain_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"flags", "flags",

View file

@ -384,7 +384,7 @@ static int blueline_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return ((payloads_decoded > 0) ? payloads_decoded : most_applicable_failure); return ((payloads_decoded > 0) ? payloads_decoded : most_applicable_failure);
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"flags", "flags",

View file

@ -56,7 +56,7 @@ static int blyss_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return DECODE_FAIL_SANITY; return DECODE_FAIL_SANITY;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
NULL, NULL,

View file

@ -113,7 +113,7 @@ static int brennenstuhl_rcs_2044_callback(r_device *decoder, bitbuffer_t *bitbuf
return counter; return counter;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"key", "key",

View file

@ -95,7 +95,7 @@ static int bresser_3ch_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"channel", "channel",

View file

@ -160,7 +160,7 @@ static int bresser_5in1_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"battery_ok", "battery_ok",

View file

@ -218,7 +218,7 @@ static int bresser_6in1_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"channel", "channel",

View file

@ -134,7 +134,7 @@ static int bresser_7in1_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"temperature_C", "temperature_C",

View file

@ -84,7 +84,7 @@ static int bt_rain_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"channel", "channel",

View file

@ -119,7 +119,7 @@ static int burnhardbbq_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return ret; return ret;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"channel", "channel",

View file

@ -116,7 +116,7 @@ static int calibeur_rf104_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"temperature_C", "temperature_C",

View file

@ -109,7 +109,7 @@ static int cardin_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"dipswitch", "dipswitch",
"rbutton", "rbutton",

View file

@ -118,7 +118,7 @@ static int cavius_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"battery_ok", "battery_ok",

View file

@ -93,7 +93,7 @@ static int ced7000_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"count", "count",

View file

@ -132,7 +132,7 @@ static int celsia_czc1_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"heat", "heat",

View file

@ -87,7 +87,7 @@ static int chuango_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"cmd", "cmd",

View file

@ -109,7 +109,7 @@ static int cmr113_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"current_1_A", "current_1_A",
"current_2_A", "current_2_A",

View file

@ -127,7 +127,7 @@ static int companion_wtr001_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"temperature_C", "temperature_C",
"mic", "mic",

View file

@ -133,7 +133,7 @@ static int cotech_36_7959_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *cotech_36_7959_output_fields[] = { static char const *const cotech_36_7959_output_fields[] = {
"model", "model",
//"subtype", //"subtype",
"id", "id",

View file

@ -114,7 +114,7 @@ static int current_cost_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 0; return 0;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"subtype", "subtype",

View file

@ -147,7 +147,7 @@ static int danfoss_cfr_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return DECODE_ABORT_LENGTH; return DECODE_ABORT_LENGTH;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"temperature_C", "temperature_C",

View file

@ -208,7 +208,7 @@ static int digitech_xc0324_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return events > 0 ? events : ret; return events > 0 ? events : ret;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"temperature_C", "temperature_C",

View file

@ -360,7 +360,7 @@ static int directv_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"button_id", "button_id",

View file

@ -133,7 +133,7 @@ static int dish_remote_6_3_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"button", "button",
NULL, NULL,

View file

@ -244,7 +244,7 @@ static int dsc_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return result; return result;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"closed", "closed",

View file

@ -171,7 +171,7 @@ static int ecodhome_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"message_type", "message_type",

View file

@ -106,7 +106,7 @@ static int ecowitt_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"channel", "channel",

View file

@ -110,7 +110,7 @@ static int efergy_e2_classic_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"battery_ok", "battery_ok",

View file

@ -124,7 +124,7 @@ static int efergy_optical_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"pulses", "pulses",

View file

@ -121,7 +121,7 @@ static int eurochron_efth800_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"channel", "channel",

View file

@ -49,7 +49,7 @@ static int elro_db286a_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
NULL, NULL,

View file

@ -95,7 +95,7 @@ static int em1000_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *elv_em1000_output_fields[] = { static char const *const elv_em1000_output_fields[] = {
"model", "model",
"id", "id",
"seq", "seq",
@ -263,7 +263,7 @@ static int ws2000_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *elv_ws2000_output_fields[] = { static char const *const elv_ws2000_output_fields[] = {
"model", "model",
"id", "id",
"subtype", "subtype",

View file

@ -250,7 +250,7 @@ static int emax_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return ret; return ret;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"channel", "channel",

View file

@ -138,7 +138,7 @@ static int emontx_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return events; return events;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"node", "node",
"ct1", "ct1",

View file

@ -124,7 +124,7 @@ static int emos_e6016_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"channel", "channel",

View file

@ -99,7 +99,7 @@ static int emos_e6016_rain_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"channel", "channel",

View file

@ -90,7 +90,7 @@ static int enocean_erp1_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"telegram", "telegram",
"mic", "mic",

View file

@ -581,7 +581,7 @@ static int ert_netidm_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
// Common fields // Common fields
"model", "model",

View file

@ -95,7 +95,7 @@ static int ert_scm_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"physical_tamper", "physical_tamper",

View file

@ -87,7 +87,7 @@ static int esa_cost_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"impulses", "impulses",

View file

@ -91,7 +91,7 @@ static int esic_emt7110_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"power_W", "power_W",

View file

@ -112,7 +112,7 @@ static int esperanza_ews_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"channel", "channel",

View file

@ -83,7 +83,7 @@ static int eurochron_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"battery_ok", "battery_ok",

View file

@ -953,7 +953,7 @@ static int fineoffset_WH0530_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"temperature_C", "temperature_C",
@ -962,7 +962,7 @@ static char const *output_fields[] = {
NULL, NULL,
}; };
static char const *output_fields_WH25[] = { static char const *const output_fields_WH25[] = {
"model", "model",
"id", "id",
"battery_ok", "battery_ok",
@ -984,7 +984,7 @@ static char const *output_fields_WH25[] = {
NULL, NULL,
}; };
static char const *output_fields_WH51[] = { static char const *const output_fields_WH51[] = {
"model", "model",
"id", "id",
"battery_ok", "battery_ok",
@ -996,7 +996,7 @@ static char const *output_fields_WH51[] = {
NULL, NULL,
}; };
static char const *output_fields_WH0530[] = { static char const *const output_fields_WH0530[] = {
"model", "model",
"id", "id",
"battery_ok", "battery_ok",

View file

@ -120,7 +120,7 @@ static int fineoffset_wh1050_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"battery_ok", "battery_ok",

View file

@ -326,7 +326,7 @@ static int fineoffset_wh1080_callback_fsk(r_device *decoder, bitbuffer_t *bitbuf
return fineoffset_wh1080_callback(decoder, bitbuffer, TYPE_FSK); return fineoffset_wh1080_callback(decoder, bitbuffer, TYPE_FSK);
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"subtype", "subtype",
"id", "id",

View file

@ -154,7 +154,7 @@ static int fineoffset_wh31l_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"battery_ok", "battery_ok",

View file

@ -128,7 +128,7 @@ static int fineoffset_wh45_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"battery_ok", "battery_ok",

View file

@ -110,7 +110,7 @@ static int fineoffset_wn34_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"battery_ok", "battery_ok",

View file

@ -113,7 +113,7 @@ static int fineoffset_ws80_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"battery_ok", "battery_ok",

View file

@ -342,7 +342,7 @@ static int flex_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"count", "count",
"num_rows", "num_rows",

View file

@ -122,7 +122,7 @@ static int flowis_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"type", "type",

View file

@ -62,7 +62,7 @@ static int fordremote_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return found; return found;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"code", "code",

View file

@ -33,7 +33,7 @@ Command extensions are also not decoded. feel free to improve!
static int fs20_decode(r_device *decoder, bitbuffer_t *bitbuffer) static int fs20_decode(r_device *decoder, bitbuffer_t *bitbuffer)
{ {
static char const *cmd_tab[] = { static char const *const cmd_tab[] = {
"off", "off",
"on, 6.25%", "on, 6.25%",
"on, 12.5%", "on, 12.5%",
@ -122,7 +122,7 @@ static int fs20_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"housecode", "housecode",
"address", "address",

View file

@ -65,7 +65,7 @@ static int ft004b_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"temperature_C", "temperature_C",
NULL, NULL,

View file

@ -160,7 +160,7 @@ static int funkbus_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return events; return events;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"battery_ok", "battery_ok",

View file

@ -92,7 +92,7 @@ static int gasmate_ba1008_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"temperature_C", "temperature_C",
"unknown_1", "unknown_1",

View file

@ -157,7 +157,7 @@ static int ge_coloreffects_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return events > 0 ? events : ret; return events > 0 ? events : ret;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"command", "command",

View file

@ -62,7 +62,7 @@ static int generic_motion_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return DECODE_ABORT_EARLY; return DECODE_ABORT_EARLY;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"code", "code",
NULL, NULL,

View file

@ -71,7 +71,7 @@ static int generic_remote_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"cmd", "cmd",

View file

@ -60,7 +60,7 @@ static int generic_temperature_sensor_callback(r_device *decoder, bitbuffer_t *b
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"battery_ok", "battery_ok",

View file

@ -343,7 +343,7 @@ static int minim_decode(r_device *decoder, bitbuffer_t *bitbuffer)
} }
// List of fields to appear in the `-F csv` output. // List of fields to appear in the `-F csv` output.
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"power_VA", "power_VA",

View file

@ -238,7 +238,7 @@ static int govee_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"battery_ok", "battery_ok",

View file

@ -127,7 +127,7 @@ static int gt_tmbbq05_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"temperature_F", "temperature_F",

View file

@ -115,7 +115,7 @@ static int gt_wt_02_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return counter; return counter;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"channel", "channel",

View file

@ -146,7 +146,7 @@ static int gt_wt_03_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"channel", "channel",

View file

@ -86,7 +86,7 @@ static int hcs200_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"battery_ok", "battery_ok",

View file

@ -226,7 +226,7 @@ static int hideki_ts04_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return ret; return ret;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"channel", "channel",

View file

@ -118,7 +118,7 @@ static int holman_ws5029pcm_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"temperature_C", "temperature_C",

View file

@ -18,7 +18,7 @@ Note that this is actually Manchester coded and should be changed.
*/ */
#include "decoder.h" #include "decoder.h"
static char const *command_code[] = {"boot", "unlock" , "lock",}; static char const *const command_code[] = {"boot", "unlock" , "lock",};
static char const *get_command_codes(const uint8_t *bytes) static char const *get_command_codes(const uint8_t *bytes)
{ {
@ -61,7 +61,7 @@ static int hondaremote_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 0; return 0;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"code", "code",

View file

@ -123,7 +123,7 @@ static int honeywell_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"channel", "channel",

View file

@ -418,7 +418,7 @@ static int honeywell_cm921_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"ids", "ids",
#ifdef _DEBUG #ifdef _DEBUG

View file

@ -113,7 +113,7 @@ static int honeywell_wdb_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"subtype", "subtype",
"id", "id",

View file

@ -79,7 +79,7 @@ static int ht680_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 0; return 0;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"button1", "button1",

View file

@ -80,7 +80,7 @@ static int ibis_beacon_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"counter", "counter",

View file

@ -274,7 +274,7 @@ static int ikea_sparsnas_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"sequence", "sequence",

View file

@ -98,7 +98,7 @@ static int infactory_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"channel", "channel",

View file

@ -128,7 +128,7 @@ static int inkbird_ith20r_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"id", "id",
"battery", "battery",

View file

@ -74,7 +74,7 @@ static int kw9015b_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *kw9015b_csv_output_fields[] = { static char const *const kw9015b_csv_output_fields[] = {
"model", "model",
"id", "id",
"battery_ok", "battery_ok",

View file

@ -458,7 +458,7 @@ static int insteon_callback(r_device *decoder, bitbuffer_t *bitbuffer)
* *
*/ */
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
// "id", // "id",
// "data", // "data",

View file

@ -214,7 +214,7 @@ static int interlogix_decode(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"subtype", "subtype",
"id", "id",

View file

@ -51,7 +51,7 @@ static int intertechno_callback(r_device *decoder, bitbuffer_t *bitbuffer)
return 1; return 1;
} }
static char const *output_fields[] = { static char const *const output_fields[] = {
"model", "model",
"type", "type",
"id", "id",

Some files were not shown because too many files have changed in this diff Show more