Closed andig closed 3 years ago
Do you think it possible to choose fs type according hardware platform?
We would probably need to add a define to redefine the term SPIFFS or LittleFS and use the define as stand-in for the actual implementation? That way we could keep the defines at the Header level without if/elsing the entire file?
This is working now except for an esp32 error I cannot quite graps (not a C person):
/Users/andig/htdocs/mitsubishi2MQTT/src/mitsubishi2mqtt/mitsubishi2mqtt.ino: In function 'void setup()':
/Users/andig/htdocs/mitsubishi2MQTT/src/mitsubishi2mqtt/mitsubishi2mqtt.ino:177:39: error: invalid conversion from 'void (*)(byte*, unsigned int, const char*) {aka void (*)(unsigned char*, unsigned int, const char*)}' to 'void (*)(byte*, unsigned int, char*) {aka void (*)(unsigned char*, unsigned int, char*)}' [-fpermissive]
hp.setPacketCallback(hpPacketDebug);
^
In file included from /Users/andig/htdocs/mitsubishi2MQTT/src/mitsubishi2mqtt/mitsubishi2mqtt.ino:39:0:
.pio/libdeps/esp32/HeatPump_ID7096/src/HeatPump.h:234:10: note: initializing argument 1 of 'void HeatPump::setPacketCallback(void (*)(byte*, unsigned int, char*))'
void setPacketCallback(PACKET_CALLBACK_SIGNATURE);
^
Since I'm seeing the same error on master this should be good to go.
Thanks a lot :) I will try it.
As you've noticed, esp32 also didn't have a unit_conf
. I'm pretty sure that it never worked before?
I do not use esp32 so I never test it. I think it is something I change for esp8266 and forgot to change it for esp32. I try to compil for esp32. I have same issue. I do not understand. This is a part of code that I copy from mitsubishi_heatpump_mqtt_esp8266_esp32.ino. And it work in the example. I have not many time tonight to search more. I hope to find time this week.
I think this project LittleFS not have big advantage compare to SPIFFS, which i have fully test on both ESP8266 and ESP32 for function like firmware update over OTA.
I think will keep SPIFFS
NOTE: while this PR compiles with the OOTB boards supported, there doesn't seem to be a LittleFS port for ESP32 yet, see https://github.com/espressif/arduino-esp32/issues/3765