diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.1/src/epd2in9.cpp b/lib/esp-epaper-29-ws-20171230-gemu-1.1/src/epd2in9.cpp index 90e257483..81fa618a8 100644 --- a/lib/esp-epaper-29-ws-20171230-gemu-1.1/src/epd2in9.cpp +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.1/src/epd2in9.cpp @@ -81,6 +81,7 @@ int16_t Epd::Begin(int16_t cs,int16_t mosi,int16_t sclk) { cs_pin=cs; mosi_pin=mosi; sclk_pin=sclk; + return 0; } diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.1/src/epd4in2.cpp b/lib/esp-epaper-29-ws-20171230-gemu-1.1/src/epd4in2.cpp index 8450a9647..923e72106 100644 --- a/lib/esp-epaper-29-ws-20171230-gemu-1.1/src/epd4in2.cpp +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.1/src/epd4in2.cpp @@ -94,6 +94,7 @@ int16_t Epd42::Begin(int16_t cs,int16_t mosi,int16_t sclk) { cs_pin=cs; mosi_pin=mosi; sclk_pin=sclk; + return 0; } void Epd42::Init(int8_t p) { @@ -130,14 +131,14 @@ int Epd42::Init(void) { SendCommand(PANEL_SETTING); // SendData(0xbf); // KW-BF KWR-AF BWROTP 0f // SendData(0x0b); -// SendData(0x0F); //300x400 Red mode, LUT from OTP -// SendData(0x1F); //300x400 B/W mode, LUT from OTP - SendData(0x3F); //300x400 B/W mode, LUT set by register -// SendData(0x2F); //300x400 Red mode, LUT set by register +// SendData(0x0F); //300x400 Red mode, LUT from OTP +// SendData(0x1F); //300x400 B/W mode, LUT from OTP + SendData(0x3F); //300x400 B/W mode, LUT set by register +// SendData(0x2F); //300x400 Red mode, LUT set by register SendCommand(PLL_CONTROL); SendData(0x3C); // 3A 100Hz 29 150Hz 39 200Hz 31 171Hz 3C 50Hz (default) 0B 10Hz - //SendData(0x0B); //0B is 10Hz + //SendData(0x0B); //0B is 10Hz /* EPD hardware init end */ return 0; } diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.1/src/epdpaint.cpp b/lib/esp-epaper-29-ws-20171230-gemu-1.1/src/epdpaint.cpp index 7b6db3206..d201c3d63 100644 --- a/lib/esp-epaper-29-ws-20171230-gemu-1.1/src/epdpaint.cpp +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.1/src/epdpaint.cpp @@ -38,7 +38,7 @@ void Paint::DisplayOnff(int8_t on) { } int16_t Paint::Begin(int16_t p1,int16_t p2,int16_t p3) { - + return 0; } void Paint::Updateframe() { diff --git a/lib/esp-knx-ip-0.5.2/esp-knx-ip.cpp b/lib/esp-knx-ip-0.5.2/esp-knx-ip.cpp index 96f4e1c73..35cbb2161 100644 --- a/lib/esp-knx-ip-0.5.2/esp-knx-ip.cpp +++ b/lib/esp-knx-ip-0.5.2/esp-knx-ip.cpp @@ -247,6 +247,7 @@ callback_assignment_id_t ESPKNXIP::__callback_register_assignment(address_t addr return id; } } + return -1; } void ESPKNXIP::__callback_delete_assignment(callback_assignment_id_t id) @@ -358,6 +359,7 @@ callback_id_t ESPKNXIP::callback_register(String name, callback_fptr_t cb, void return id; } } + return -1; } void ESPKNXIP::callback_deregister(callback_id_t id) diff --git a/lib/esp-knx-ip-0.5.2/esp-knx-ip.h b/lib/esp-knx-ip-0.5.2/esp-knx-ip.h index 7150706bb..6834a6125 100644 --- a/lib/esp-knx-ip-0.5.2/esp-knx-ip.h +++ b/lib/esp-knx-ip-0.5.2/esp-knx-ip.h @@ -270,7 +270,8 @@ typedef struct __cemi_msg uint8_t additional_info_len; union { - cemi_addi_t additional_info[]; +// cemi_addi_t additional_info[]; // Errors in GCC 10.1 + cemi_addi_t additional_info[10]; // Changed to arbitrary number to fix compilation cemi_service_t service_information; } data; } cemi_msg_t; diff --git a/tasmota/support_float.ino b/tasmota/support_float.ino index 98553d183..a72712632 100644 --- a/tasmota/support_float.ino +++ b/tasmota/support_float.ino @@ -218,6 +218,7 @@ float cos_52(float x) case 2: return -cos_52s(x-(float)f_pi); case 3: return cos_52s((float)f_twopi - x); } + return 0.0; // Never reached. Fixes compiler warning } // // The sine is just cosine shifted a half-f_pi, so @@ -278,6 +279,7 @@ float tan_56(float x) case 6: return -1.0f / tan_56s((x-(float)f_threehalfpi) * (float)f_four_over_pi); case 7: return - tan_56s(((float)f_twopi - x) * (float)f_four_over_pi); } + return 0.0; // Never reached. Fixes compiler warning } // ******************************************************************* diff --git a/tasmota/support_network.ino b/tasmota/support_network.ino index 4f6da4d88..efbd0be92 100644 --- a/tasmota/support_network.ino +++ b/tasmota/support_network.ino @@ -99,6 +99,7 @@ char* NetworkHostname(void) { } #endif #endif + return nullptr; // Never reached. Fix GCC10 warning } IPAddress NetworkAddress(void) { @@ -112,6 +113,7 @@ IPAddress NetworkAddress(void) { } #endif #endif + return 0; // Never reached. Fix GCC10 warning } String NetworkMacAddress(void) { @@ -125,4 +127,5 @@ String NetworkMacAddress(void) { } #endif #endif + return ""; // Never reached. Fix GCC10 warning } diff --git a/tasmota/xdrv_04_light.ino b/tasmota/xdrv_04_light.ino index d284e71fe..ab311d6f0 100644 --- a/tasmota/xdrv_04_light.ino +++ b/tasmota/xdrv_04_light.ino @@ -477,7 +477,7 @@ class LightStateClass { if (w) { *w = ct_channels_on ? changeUIntScale(_ww, 0, 255, 0, _briCT) : 0; } } - uint8_t getChannels(uint8_t *channels) { + void getChannels(uint8_t *channels) { getActualRGBCW(&channels[0], &channels[1], &channels[2], &channels[3], &channels[4]); } diff --git a/tasmota/xdrv_10_rules.ino b/tasmota/xdrv_10_rules.ino index db22183c5..782116fc0 100644 --- a/tasmota/xdrv_10_rules.ino +++ b/tasmota/xdrv_10_rules.ino @@ -294,6 +294,7 @@ String GetRule(uint32_t idx) { return rule; #endif } + return ""; // Fix GCC10 warning } #ifdef USE_UNISHOX_COMPRESSION diff --git a/tasmota/xdrv_22_sonoff_ifan.ino b/tasmota/xdrv_22_sonoff_ifan.ino index 8c6ceffb6..a51265f99 100644 --- a/tasmota/xdrv_22_sonoff_ifan.ino +++ b/tasmota/xdrv_22_sonoff_ifan.ino @@ -156,38 +156,38 @@ void SonoffIfanReceived(void) bool SonoffIfanSerialInput(void) { - if (SONOFF_IFAN03 == my_module_type) { - if (0xAA == serial_in_byte) { // 0xAA - Start of text - serial_in_byte_counter = 0; - ifan_receive_flag = true; - } - if (ifan_receive_flag) { - serial_in_buffer[serial_in_byte_counter++] = serial_in_byte; - if (serial_in_byte_counter == 8) { - // AA 55 01 01 00 01 01 04 - Wifi long press - start wifi setup - // AA 55 01 01 00 01 02 05 - Rf and Wifi short press - // AA 55 01 04 00 01 00 06 - Fan 0 - // AA 55 01 04 00 01 01 07 - Fan 1 - // AA 55 01 04 00 01 02 08 - Fan 2 - // AA 55 01 04 00 01 03 09 - Fan 3 - // AA 55 01 04 00 01 04 0A - Light - // AA 55 01 06 00 01 01 09 - Buzzer - // AA 55 01 07 00 01 01 0A - Rf long press - forget RF codes - AddLogSerial(LOG_LEVEL_DEBUG); - uint8_t crc = 0; - for (uint32_t i = 2; i < 7; i++) { - crc += serial_in_buffer[i]; - } - if (crc == serial_in_buffer[7]) { - SonoffIfanReceived(); - ifan_receive_flag = false; - return true; - } - } - serial_in_byte = 0; - } - return false; + if (SONOFF_IFAN03 != my_module_type) { return false; } + + if (0xAA == serial_in_byte) { // 0xAA - Start of text + serial_in_byte_counter = 0; + ifan_receive_flag = true; } + if (ifan_receive_flag) { + serial_in_buffer[serial_in_byte_counter++] = serial_in_byte; + if (serial_in_byte_counter == 8) { + // AA 55 01 01 00 01 01 04 - Wifi long press - start wifi setup + // AA 55 01 01 00 01 02 05 - Rf and Wifi short press + // AA 55 01 04 00 01 00 06 - Fan 0 + // AA 55 01 04 00 01 01 07 - Fan 1 + // AA 55 01 04 00 01 02 08 - Fan 2 + // AA 55 01 04 00 01 03 09 - Fan 3 + // AA 55 01 04 00 01 04 0A - Light + // AA 55 01 06 00 01 01 09 - Buzzer + // AA 55 01 07 00 01 01 0A - Rf long press - forget RF codes + AddLogSerial(LOG_LEVEL_DEBUG); + uint8_t crc = 0; + for (uint32_t i = 2; i < 7; i++) { + crc += serial_in_buffer[i]; + } + if (crc == serial_in_buffer[7]) { + SonoffIfanReceived(); + ifan_receive_flag = false; + return true; + } + } + serial_in_byte = 0; + } + return false; } /*********************************************************************************************\ diff --git a/tasmota/xnrg_02_cse7766.ino b/tasmota/xnrg_02_cse7766.ino index 9c8417bc6..053c4c6ba 100644 --- a/tasmota/xnrg_02_cse7766.ino +++ b/tasmota/xnrg_02_cse7766.ino @@ -141,7 +141,7 @@ void CseReceived(void) { } } -bool CseSerialInput(void) { +void CseSerialInput(void) { while (CseSerial->available()) { yield(); uint8_t serial_in_byte = CseSerial->read(); @@ -158,7 +158,7 @@ bool CseSerialInput(void) { Energy.data_valid[0] = 0; CseReceived(); Cse.received = false; - return true; + return; } else { do { // Sync buffer with data (issue #1907 and #3425) memmove(Cse.rx_buffer, Cse.rx_buffer +1, 24); diff --git a/tasmota/xnrg_14_bl0940.ino b/tasmota/xnrg_14_bl0940.ino index fae36ea3a..7b021106f 100644 --- a/tasmota/xnrg_14_bl0940.ino +++ b/tasmota/xnrg_14_bl0940.ino @@ -121,7 +121,7 @@ void Bl0940Received(void) { } } -bool Bl0940SerialInput(void) { +void Bl0940SerialInput(void) { while (Bl0940Serial->available()) { yield(); uint8_t serial_in_byte = Bl0940Serial->read(); @@ -142,7 +142,7 @@ bool Bl0940SerialInput(void) { Energy.data_valid[0] = 0; Bl0940Received(); Bl0940.received = false; - return true; + return; } else { do { // Sync buffer with data (issue #1907 and #3425) memmove(Bl0940.rx_buffer, Bl0940.rx_buffer +1, BL0940_BUFFER_SIZE -1);