lightmeter_scene_help.c 1003 B

1234567891011121314151617181920212223242526272829303132333435
  1. #include "../../lightmeter.h"
  2. void lightmeter_scene_help_on_enter(void* context) {
  3. LightMeterApp* app = context;
  4. FuriString* temp_str;
  5. temp_str = furi_string_alloc();
  6. furi_string_printf(
  7. temp_str,
  8. "App works with BH1750 and MAX44409 ambient light sensor connected via I2C interface\n\n");
  9. furi_string_cat(temp_str, "\e#Pinout:\r\n");
  10. furi_string_cat(
  11. temp_str,
  12. " VCC: 3.3V\r\n"
  13. " GND: GND\r\n"
  14. " SDA: 15 [C1]\r\n"
  15. " SCL: 16 [C0]\r\n");
  16. widget_add_text_scroll_element(app->widget, 0, 0, 128, 64, furi_string_get_cstr(temp_str));
  17. furi_string_free(temp_str);
  18. view_dispatcher_switch_to_view(app->view_dispatcher, LightMeterAppViewHelp);
  19. }
  20. bool lightmeter_scene_help_on_event(void* context, SceneManagerEvent event) {
  21. UNUSED(context);
  22. UNUSED(event);
  23. return false;
  24. }
  25. void lightmeter_scene_help_on_exit(void* context) {
  26. LightMeterApp* app = context;
  27. widget_reset(app->widget);
  28. }