mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 03:06:33 +00:00
Fix Arduino IDE compile error
Fix Arduino IDE function prototyping compile error (#6982)
This commit is contained in:
parent
a4057140e2
commit
00c7ee0bb8
@ -4,6 +4,7 @@
|
||||
|
||||
- Add colorpicker to WebUI by Christian Staars (#6984)
|
||||
- Change new Fade system much smoother, Speed now up to 40 (#6942, #3714)
|
||||
- Fix Arduino IDE function prototyping compile error (#6982)
|
||||
|
||||
### 7.0.0.5 20191118
|
||||
|
||||
|
@ -26,15 +26,16 @@
|
||||
|
||||
#include <IRremoteESP8266.h>
|
||||
|
||||
enum IrErrors { IE_NO_ERROR, IE_INVALID_RAWDATA, IE_INVALID_JSON, IE_SYNTAX_IRSEND, IE_SYNTAX_IRHVAC };
|
||||
enum IrErrors { IE_NO_ERROR, IE_INVALID_RAWDATA, IE_INVALID_JSON, IE_SYNTAX_IRSEND };
|
||||
|
||||
const char kIrRemoteCommands[] PROGMEM = "|" D_CMND_IRSEND ;
|
||||
|
||||
void (* const IrRemoteCommand[])(void) PROGMEM = { &CmndIrSend };
|
||||
// Keep below IrRemoteCommand lines exactly as below as otherwise Arduino IDE prototyping will fail (#6982)
|
||||
void (* const IrRemoteCommand[])(void) PROGMEM = {
|
||||
&CmndIrSend };
|
||||
|
||||
// Based on IRremoteESP8266.h enum decode_type_t
|
||||
static const uint8_t MAX_STANDARD_IR = SHARP; // this is the last code mapped to decode_type_t
|
||||
enum IrVendors { IR_BASE = MAX_STANDARD_IR };
|
||||
static const uint8_t MAX_STANDARD_IR = NEC; // this is the last code mapped to decode_type_t
|
||||
const char kIrRemoteProtocols[] PROGMEM = "UNKNOWN|RC5|RC6|NEC";
|
||||
|
||||
/*********************************************************************************************\
|
||||
@ -86,7 +87,7 @@ void IrReceiveInit(void)
|
||||
|
||||
void IrReceiveCheck(void)
|
||||
{
|
||||
char sirtype[14]; // Max is AIWA_RC_T501
|
||||
char sirtype[8]; // Max is UNKNOWN
|
||||
int8_t iridx = 0;
|
||||
|
||||
decode_results results;
|
||||
@ -95,7 +96,7 @@ void IrReceiveCheck(void)
|
||||
char hvalue[65]; // Max 256 bits
|
||||
|
||||
iridx = results.decode_type;
|
||||
if ((iridx < 0) || (iridx > 14)) { iridx = 0; } // UNKNOWN
|
||||
if ((iridx < 0) || (iridx > MAX_STANDARD_IR)) { iridx = 0; } // UNKNOWN
|
||||
|
||||
if (iridx) {
|
||||
if (results.bits > 64) {
|
||||
|
@ -33,9 +33,11 @@
|
||||
enum IrErrors { IE_RESPONSE_PROVIDED, IE_NO_ERROR, IE_INVALID_RAWDATA, IE_INVALID_JSON, IE_SYNTAX_IRSEND, IE_SYNTAX_IRHVAC,
|
||||
IE_UNSUPPORTED_HVAC, IE_UNSUPPORTED_PROTOCOL };
|
||||
|
||||
const char kIrRemoteCommands[] PROGMEM = "|" D_CMND_IRHVAC "|" D_CMND_IRSEND ; // No prefix
|
||||
const char kIrRemoteCommands[] PROGMEM = "|"
|
||||
D_CMND_IRHVAC "|" D_CMND_IRSEND ; // No prefix
|
||||
|
||||
void (* const IrRemoteCommand[])(void) PROGMEM = { &CmndIrHvac, &CmndIrSend };
|
||||
void (* const IrRemoteCommand[])(void) PROGMEM = {
|
||||
&CmndIrHvac, &CmndIrSend };
|
||||
|
||||
/*********************************************************************************************\
|
||||
* IR Send
|
||||
|
@ -29,8 +29,8 @@ const uint8_t SERIAL_BRIDGE_BUFFER_SIZE = 130;
|
||||
const char kSerialBridgeCommands[] PROGMEM = "|" // No prefix
|
||||
D_CMND_SSERIALSEND "|" D_CMND_SBAUDRATE;
|
||||
|
||||
void (* const SerialBridgeCommand[])(void) PROGMEM =
|
||||
{ &CmndSSerialSend, &CmndSBaudrate };
|
||||
void (* const SerialBridgeCommand[])(void) PROGMEM = {
|
||||
&CmndSSerialSend, &CmndSBaudrate };
|
||||
|
||||
#include <TasmotaSerial.h>
|
||||
|
||||
|
@ -35,8 +35,8 @@
|
||||
const char kRfSendCommands[] PROGMEM = "|" // No prefix
|
||||
D_CMND_RFSEND;
|
||||
|
||||
void (* const RfSendCommand[])(void) PROGMEM =
|
||||
{ &CmndRfSend };
|
||||
void (* const RfSendCommand[])(void) PROGMEM = {
|
||||
&CmndRfSend };
|
||||
|
||||
#include <RCSwitch.h>
|
||||
|
||||
|
@ -33,8 +33,8 @@ const uint8_t kIFan03Sequence[MAX_FAN_SPEED][MAX_FAN_SPEED] = {{0, 2, 2, 2}, {0,
|
||||
const char kSonoffIfanCommands[] PROGMEM = "|" // No prefix
|
||||
D_CMND_FANSPEED;
|
||||
|
||||
void (* const SonoffIfanCommand[])(void) PROGMEM =
|
||||
{ &CmndFanspeed };
|
||||
void (* const SonoffIfanCommand[])(void) PROGMEM = {
|
||||
&CmndFanspeed };
|
||||
|
||||
uint8_t ifan_fanspeed_timer = 0;
|
||||
uint8_t ifan_fanspeed_goal = 0;
|
||||
|
@ -36,13 +36,15 @@ TasmotaSerial *ZigbeeSerial = nullptr;
|
||||
#endif
|
||||
|
||||
|
||||
const char kZigbeeCommands[] PROGMEM = "|" D_CMND_ZIGBEEZNPSEND "|" D_CMND_ZIGBEE_PERMITJOIN
|
||||
"|" D_CMND_ZIGBEE_STATUS "|" D_CMND_ZIGBEE_RESET "|" D_CMND_ZIGBEE_SEND
|
||||
"|" D_CMND_ZIGBEE_PROBE "|" D_CMND_ZIGBEE_READ ;
|
||||
const char kZigbeeCommands[] PROGMEM = "|"
|
||||
D_CMND_ZIGBEEZNPSEND "|" D_CMND_ZIGBEE_PERMITJOIN "|"
|
||||
D_CMND_ZIGBEE_STATUS "|" D_CMND_ZIGBEE_RESET "|" D_CMND_ZIGBEE_SEND "|"
|
||||
D_CMND_ZIGBEE_PROBE "|" D_CMND_ZIGBEE_READ ;
|
||||
|
||||
void (* const ZigbeeCommand[])(void) PROGMEM = { &CmndZigbeeZNPSend, &CmndZigbeePermitJoin,
|
||||
&CmndZigbeeStatus, &CmndZigbeeReset, &CmndZigbeeSend,
|
||||
&CmndZigbeeProbe, &CmndZigbeeRead };
|
||||
void (* const ZigbeeCommand[])(void) PROGMEM = {
|
||||
&CmndZigbeeZNPSend, &CmndZigbeePermitJoin,
|
||||
&CmndZigbeeStatus, &CmndZigbeeReset, &CmndZigbeeSend,
|
||||
&CmndZigbeeProbe, &CmndZigbeeRead };
|
||||
|
||||
int32_t ZigbeeProcessInput(class SBuffer &buf) {
|
||||
if (!zigbee.state_machine) { return -1; } // if state machine is stopped, send 'ignore' message
|
||||
@ -260,7 +262,7 @@ uint32_t strToUInt(const JsonVariant val) {
|
||||
return 0; // couldn't parse anything
|
||||
}
|
||||
|
||||
const unsigned char ZIGBEE_FACTORY_RESET[] PROGMEM =
|
||||
const unsigned char ZIGBEE_FACTORY_RESET[] PROGMEM =
|
||||
{ Z_SREQ | Z_SAPI, SAPI_WRITE_CONFIGURATION, CONF_STARTUP_OPTION, 0x01 /* len */, 0x01 /* STARTOPT_CLEAR_CONFIG */};
|
||||
//"2605030101"; // Z_SREQ | Z_SAPI, SAPI_WRITE_CONFIGURATION, CONF_STARTUP_OPTION, 0x01 len, 0x01 STARTOPT_CLEAR_CONFIG
|
||||
// Do a factory reset of the CC2530
|
||||
|
@ -508,10 +508,10 @@ const char kExsCommands[] PROGMEM = D_PRFX_EXS "|"
|
||||
D_CMND_EXS_DIMMS "|" D_CMND_EXS_CH_LOCK "|"
|
||||
D_CMND_EXS_STATE;
|
||||
|
||||
void (* const ExsCommand[])(void) PROGMEM =
|
||||
{ &CmndExsDimm, &CmndExsDimmTbl, &CmndExsDimmVal,
|
||||
&CmndExsDimms, &CmndExsChLock,
|
||||
&CmndExsState };
|
||||
void (* const ExsCommand[])(void) PROGMEM = {
|
||||
&CmndExsDimm, &CmndExsDimmTbl, &CmndExsDimmVal,
|
||||
&CmndExsDimms, &CmndExsChLock,
|
||||
&CmndExsState };
|
||||
|
||||
void CmndExsDimm(void)
|
||||
{
|
||||
|
@ -31,8 +31,8 @@
|
||||
const char kCounterCommands[] PROGMEM = D_PRFX_COUNTER "|" // Prefix
|
||||
"|" D_CMND_COUNTERTYPE "|" D_CMND_COUNTERDEBOUNCE ;
|
||||
|
||||
void (* const CounterCommand[])(void) PROGMEM =
|
||||
{ &CmndCounter, &CmndCounterType, &CmndCounterDebounce };
|
||||
void (* const CounterCommand[])(void) PROGMEM = {
|
||||
&CmndCounter, &CmndCounterType, &CmndCounterDebounce };
|
||||
|
||||
struct COUNTER {
|
||||
uint32_t timer[MAX_COUNTERS]; // Last counter time in micro seconds
|
||||
|
@ -186,8 +186,8 @@ void AdcShow(bool json)
|
||||
const char kAdcCommands[] PROGMEM = "|" // No prefix
|
||||
D_CMND_ADC "|" D_CMND_ADCS "|" D_CMND_ADCPARAM;
|
||||
|
||||
void (* const AdcCommand[])(void) PROGMEM =
|
||||
{ &CmndAdc, &CmndAdcs, &CmndAdcParam };
|
||||
void (* const AdcCommand[])(void) PROGMEM = {
|
||||
&CmndAdc, &CmndAdcs, &CmndAdcParam };
|
||||
|
||||
void CmndAdc(void)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user