uhf_scene_settings.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // #include "../uhf_app_i.h"
  2. // void uhf_settings_set_module_baudrate(VariableItem* item) {
  3. // uint32_t baudrate =
  4. // }
  5. // void uhf_scene_on_enter(void* ctx) {
  6. // UHFApp* uhf_app = ctx;
  7. // view_dispatcher_switch_to_view(uhf_app->view_dispatcher, UHFViewMenu);
  8. // }
  9. // bool uhf_scene_on_event(void* ctx, SceneManagerEvent event) {
  10. // UHFApp* uhf_app = ctx;
  11. // bool consumed = false;
  12. // VariableItem* item;
  13. // uint8_t value_index;
  14. // // SubGhzSetting* setting = subghz_txrx_get_setting(subghz->txrx);
  15. // // SubGhzRadioPreset preset = subghz_txrx_get_preset(subghz->txrx);
  16. // item = variable_item_list_add(
  17. // subghz->variable_item_list,
  18. // "Baud Rate:",
  19. // subghz_setting_get_frequency_count(setting),
  20. // subghz_scene_receiver_config_set_frequency,
  21. // subghz);
  22. // value_index = subghz_scene_receiver_config_next_frequency(preset.frequency, subghz);
  23. // scene_manager_set_scene_state(
  24. // subghz->scene_manager, SubGhzSceneReceiverConfig, (uint32_t)item);
  25. // variable_item_set_current_value_index(item, value_index);
  26. // char text_buf[10] = {0};
  27. // uint32_t frequency = subghz_setting_get_frequency(setting, value_index);
  28. // snprintf(
  29. // text_buf,
  30. // sizeof(text_buf),
  31. // "%lu.%02lu",
  32. // frequency / 1000000,
  33. // (frequency % 1000000) / 10000);
  34. // variable_item_set_current_value_text(item, text_buf);
  35. // }
  36. // void uhf_scene_on_exit(void* ctx) {
  37. // UHFApp* uhf_app = ctx;
  38. // submenu_reset(uhf_app->submenu);
  39. // }