Flipper-Plugin-Tutorial
Flipper-Plugin-Tutorial copied to clipboard
update to be compatible with actual firmware dev
I wasn't able to use the code for the actual code base. Therefore I've updated this to work with it.
@DroomOne
I would appreciate this change too
I think there's also an issue with this merge as well. I attempted to use the updated tutorial and received the following error:
docker-compose exec dev ./fbt
APPS build/f7-firmware-D/applications/applications.c
CC applications/about/about.c
...
CC applications/hello_world/hello_world.c
applications/hello_world/hello_world.c:36:53: error: unknown type name 'FuriMessageQueue'
36 | static void input_callback(InputEvent* input_event, FuriMessageQueue* event_queue) {
| ^~~~~~~~~~~~~~~~
applications/hello_world/hello_world.c: In function 'hello_world_app':
applications/hello_world/hello_world.c:49:5: error: unknown type name 'FuriMessageQueue'
49 | FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(PluginEvent));
| ^~~~~~~~~~~~~~~~
applications/hello_world/hello_world.c:49:37: error: implicit declaration of function 'furi_message_queue_alloc' [-Werror=implicit-function-declaration]
49 | FuriMessageQueue* event_queue = furi_message_queue_alloc(8, sizeof(PluginEvent));
| ^~~~~~~~~~~~~~~~~~~~~~~~
applications/hello_world/hello_world.c:49:37: error: initialization of 'int *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
applications/hello_world/hello_world.c:65:45: error: 'input_callback' undeclared (first use in this function); did you mean 'render_callback'?
65 | view_port_input_callback_set(view_port, input_callback, event_queue);
| ^~~~~~~~~~~~~~
| render_callback
applications/hello_world/hello_world.c:65:45: note: each undeclared identifier is reported only once for each function it appears in
applications/hello_world/hello_world.c:73:9: error: unknown type name 'FuriStatus'; did you mean 'FlagStatus'?
73 | FuriStatus event_status = furi_message_queue_get(event_queue, &event, 100);
| ^~~~~~~~~~
| FlagStatus
applications/hello_world/hello_world.c:73:35: error: implicit declaration of function 'furi_message_queue_get' [-Werror=implicit-function-declaration]
73 | FuriStatus event_status = furi_message_queue_get(event_queue, &event, 100);
| ^~~~~~~~~~~~~~~~~~~~~~
applications/hello_world/hello_world.c:77:28: error: 'FuriStatusOk' undeclared (first use in this function)
77 | if(event_status == FuriStatusOk) {
| ^~~~~~~~~~~~
applications/hello_world/hello_world.c:114:5: error: implicit declaration of function 'furi_message_queue_free' [-Werror=implicit-function-declaration]
114 | furi_message_queue_free(event_queue);
| ^~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
scons: *** [build/f7-firmware-D/applications/hello_world/hello_world.o] Error 1
********** ERRORS **********
Failed building build/f7-firmware-D/applications/hello_world/hello_world.o: Error 1
+1 this PR is the only place I have been able to find this info.
@mfulz Thanks so much for the effort/update, sorry for the late pull!