Closed RogueMaster closed 3 weeks ago
Hi @RogueMaster today we are working on upgrading to the latest API. Thanks
Ok, great! I made some changes on the one in my firmware to have it compile on dev.... I recommend using fbt format to clean up the code formatting...
(fbt) C:\Users\Rogue\Documents\GitHub\flipperzero-firmware-wPlugins>fbt format python scripts/lint.py format applications lib\print lib\toolbox lib\drivers lib\flipper_format lib\one_wire lib\ibutton lib\infrared lib\subghz lib\nfc lib\digital_signal lib\pulse_reader lib\signal_reader lib\app-scened-template lib\u8g2 lib\lfrfid lib\music_worker lib\update_util lib\bit_lib lib\cfw lib\datetime targets furi
(fbt) C:\Users\Rogue\Documents\GitHub\flipperzero-firmware-wPlugins>fbt format_img python scripts/imglint.py format applications assets 2024-08-19 19:44:45,105 [INFO] Found 4550 images Image applications\external\rs485modbus\modbus.png issues: not 1-bit B&W, but RGBA; has metadata 2024-08-19 19:44:46,549 [WARNING] Applied fixes to some images
(fbt) C:\Users\Rogue\Documents\GitHub\flipperzero-firmware-wPlugins>fbt fap_modbus CC applications\external\rs485modbus\modbus.c applications\external\rs485modbus\modbus.c: In function 'uart_worker': applications\external\rs485modbus\modbus.c:626:38: error: passing argument 1 of 'furi_stream_buffer_free' from incompatible pointer type [-Werror=incompatible-pointer-types] 626 | furi_stream_buffer_free(app->uart->rxBuff); | |
---|---|---|
uint8_t {aka unsigned char } |
In file included from furi/furi.h:23, from applications\external\rs485modbus\modbus.c:2: furi/core/stream_buffer.h:42:48: note: expected 'FuriStreamBuffer ' but argument is of type 'uint8_t ' {aka 'unsigned char *'} 42 | void furi_stream_buffer_free(FuriStreamBuffer* stream_buffer); | furi_stream_buffer_free(app->msgBuf); | ||
---|---|---|---|---|
uint8_t {aka unsigned char } |
furi/core/stream_buffer.h:42:48: note: expected 'FuriStreamBuffer ' but argument is of type 'uint8_t ' {aka 'unsigned char '}
42 | void furi_stream_buffer_free(FuriStreamBuffer stream_buffer);
| ~~~~^~~
applications\external\rs485modbus\modbus.c: In function 'CFG_Scene_OnExit':
applications\external\rs485modbus\modbus.c:770:29: error: the comparison will always evaluate as 'true' for the address of 'logFilePath' will never be NULL [-Werror=address]
770 | if(app->logFilePath != NULL) {
| ^~
applications\external\rs485modbus\modbus.c:118:10: note: 'logFilePath' declared here
118 | char logFilePath[100];
| ^~~
cc1.exe: all warnings being treated as errors
SDKCHK targets\f7\api_symbols.csv
scons: *** [build\f7-firmware-C.extapps\modbus\modbus.o] Error 1
API version 72.1 is up to date
** FBT ERRORS ** build\f7-firmware-C.extapps\modbus\modbus.o: Error 1
I fix these errors in this version here: https://github.com/RogueMaster/flipperzero-firmware-wPlugins/blob/420/applications/external/rs485modbus/modbus.c
Also assets_icons.h file is called but doesn't get used and also isn't added to application.fam to have assets, better to remove inclusion since its not used.
@RogueMaster working in release v1.1.2.0
This application does not compile with the latest dev build which is most commonly used by most users and all custom firmware.