|
@@ -49,37 +49,7 @@ const uint32_t jpeg_value[2] = {
|
|
|
CameraSuiteJpegOn,
|
|
CameraSuiteJpegOn,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-const char* const haptic_text[2] = {
|
|
|
|
|
- "OFF",
|
|
|
|
|
- "ON",
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-const uint32_t haptic_value[2] = {
|
|
|
|
|
- CameraSuiteHapticOff,
|
|
|
|
|
- CameraSuiteHapticOn,
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-const char* const speaker_text[2] = {
|
|
|
|
|
- "OFF",
|
|
|
|
|
- "ON",
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-const uint32_t speaker_value[2] = {
|
|
|
|
|
- CameraSuiteSpeakerOff,
|
|
|
|
|
- CameraSuiteSpeakerOn,
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-const char* const led_text[2] = {
|
|
|
|
|
- "OFF",
|
|
|
|
|
- "ON",
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-const uint32_t led_value[2] = {
|
|
|
|
|
- CameraSuiteLedOff,
|
|
|
|
|
- CameraSuiteLedOn,
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-static void camera_suite_scene_settings_set_camera_orientation(VariableItem* item) {
|
|
|
|
|
|
|
+static void camera_suite_scene_cam_settings_set_camera_orientation(VariableItem* item) {
|
|
|
CameraSuite* app = variable_item_get_context(item);
|
|
CameraSuite* app = variable_item_get_context(item);
|
|
|
uint8_t index = variable_item_get_current_value_index(item);
|
|
uint8_t index = variable_item_get_current_value_index(item);
|
|
|
|
|
|
|
@@ -87,7 +57,7 @@ static void camera_suite_scene_settings_set_camera_orientation(VariableItem* ite
|
|
|
app->orientation = orientation_value[index];
|
|
app->orientation = orientation_value[index];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-static void camera_suite_scene_settings_set_camera_dither(VariableItem* item) {
|
|
|
|
|
|
|
+static void camera_suite_scene_cam_settings_set_camera_dither(VariableItem* item) {
|
|
|
CameraSuite* app = variable_item_get_context(item);
|
|
CameraSuite* app = variable_item_get_context(item);
|
|
|
uint8_t index = variable_item_get_current_value_index(item);
|
|
uint8_t index = variable_item_get_current_value_index(item);
|
|
|
|
|
|
|
@@ -95,7 +65,7 @@ static void camera_suite_scene_settings_set_camera_dither(VariableItem* item) {
|
|
|
app->dither = dither_value[index];
|
|
app->dither = dither_value[index];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-static void camera_suite_scene_settings_set_flash(VariableItem* item) {
|
|
|
|
|
|
|
+static void camera_suite_scene_cam_settings_set_flash(VariableItem* item) {
|
|
|
CameraSuite* app = variable_item_get_context(item);
|
|
CameraSuite* app = variable_item_get_context(item);
|
|
|
uint8_t index = variable_item_get_current_value_index(item);
|
|
uint8_t index = variable_item_get_current_value_index(item);
|
|
|
|
|
|
|
@@ -103,7 +73,7 @@ static void camera_suite_scene_settings_set_flash(VariableItem* item) {
|
|
|
app->flash = flash_value[index];
|
|
app->flash = flash_value[index];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-static void camera_suite_scene_settings_set_jpeg(VariableItem* item) {
|
|
|
|
|
|
|
+static void camera_suite_scene_cam_settings_set_jpeg(VariableItem* item) {
|
|
|
CameraSuite* app = variable_item_get_context(item);
|
|
CameraSuite* app = variable_item_get_context(item);
|
|
|
uint8_t index = variable_item_get_current_value_index(item);
|
|
uint8_t index = variable_item_get_current_value_index(item);
|
|
|
|
|
|
|
@@ -111,34 +81,12 @@ static void camera_suite_scene_settings_set_jpeg(VariableItem* item) {
|
|
|
app->jpeg = jpeg_value[index];
|
|
app->jpeg = jpeg_value[index];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-static void camera_suite_scene_settings_set_haptic(VariableItem* item) {
|
|
|
|
|
- CameraSuite* app = variable_item_get_context(item);
|
|
|
|
|
- uint8_t index = variable_item_get_current_value_index(item);
|
|
|
|
|
-
|
|
|
|
|
- variable_item_set_current_value_text(item, haptic_text[index]);
|
|
|
|
|
- app->haptic = haptic_value[index];
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-static void camera_suite_scene_settings_set_speaker(VariableItem* item) {
|
|
|
|
|
- CameraSuite* app = variable_item_get_context(item);
|
|
|
|
|
- uint8_t index = variable_item_get_current_value_index(item);
|
|
|
|
|
- variable_item_set_current_value_text(item, speaker_text[index]);
|
|
|
|
|
- app->speaker = speaker_value[index];
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-static void camera_suite_scene_settings_set_led(VariableItem* item) {
|
|
|
|
|
- CameraSuite* app = variable_item_get_context(item);
|
|
|
|
|
- uint8_t index = variable_item_get_current_value_index(item);
|
|
|
|
|
- variable_item_set_current_value_text(item, led_text[index]);
|
|
|
|
|
- app->led = led_value[index];
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-void camera_suite_scene_settings_submenu_callback(void* context, uint32_t index) {
|
|
|
|
|
|
|
+void camera_suite_scene_cam_settings_submenu_callback(void* context, uint32_t index) {
|
|
|
CameraSuite* app = context;
|
|
CameraSuite* app = context;
|
|
|
view_dispatcher_send_custom_event(app->view_dispatcher, index);
|
|
view_dispatcher_send_custom_event(app->view_dispatcher, index);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void camera_suite_scene_settings_on_enter(void* context) {
|
|
|
|
|
|
|
+void camera_suite_scene_cam_settings_on_enter(void* context) {
|
|
|
CameraSuite* app = context;
|
|
CameraSuite* app = context;
|
|
|
VariableItem* item;
|
|
VariableItem* item;
|
|
|
uint8_t value_index;
|
|
uint8_t value_index;
|
|
@@ -148,7 +96,7 @@ void camera_suite_scene_settings_on_enter(void* context) {
|
|
|
app->variable_item_list,
|
|
app->variable_item_list,
|
|
|
"Orientation:",
|
|
"Orientation:",
|
|
|
4,
|
|
4,
|
|
|
- camera_suite_scene_settings_set_camera_orientation,
|
|
|
|
|
|
|
+ camera_suite_scene_cam_settings_set_camera_orientation,
|
|
|
app);
|
|
app);
|
|
|
value_index = value_index_uint32(app->orientation, orientation_value, 4);
|
|
value_index = value_index_uint32(app->orientation, orientation_value, 4);
|
|
|
variable_item_set_current_value_index(item, value_index);
|
|
variable_item_set_current_value_index(item, value_index);
|
|
@@ -159,7 +107,7 @@ void camera_suite_scene_settings_on_enter(void* context) {
|
|
|
app->variable_item_list,
|
|
app->variable_item_list,
|
|
|
"Dithering Type:",
|
|
"Dithering Type:",
|
|
|
3,
|
|
3,
|
|
|
- camera_suite_scene_settings_set_camera_dither,
|
|
|
|
|
|
|
+ camera_suite_scene_cam_settings_set_camera_dither,
|
|
|
app);
|
|
app);
|
|
|
value_index = value_index_uint32(app->dither, dither_value, 3);
|
|
value_index = value_index_uint32(app->dither, dither_value, 3);
|
|
|
variable_item_set_current_value_index(item, value_index);
|
|
variable_item_set_current_value_index(item, value_index);
|
|
@@ -167,7 +115,7 @@ void camera_suite_scene_settings_on_enter(void* context) {
|
|
|
|
|
|
|
|
// Flash ON/OFF
|
|
// Flash ON/OFF
|
|
|
item = variable_item_list_add(
|
|
item = variable_item_list_add(
|
|
|
- app->variable_item_list, "Flash:", 2, camera_suite_scene_settings_set_flash, app);
|
|
|
|
|
|
|
+ app->variable_item_list, "Flash:", 2, camera_suite_scene_cam_settings_set_flash, app);
|
|
|
value_index = value_index_uint32(app->flash, flash_value, 2);
|
|
value_index = value_index_uint32(app->flash, flash_value, 2);
|
|
|
variable_item_set_current_value_index(item, value_index);
|
|
variable_item_set_current_value_index(item, value_index);
|
|
|
variable_item_set_current_value_text(item, flash_text[value_index]);
|
|
variable_item_set_current_value_text(item, flash_text[value_index]);
|
|
@@ -179,38 +127,17 @@ void camera_suite_scene_settings_on_enter(void* context) {
|
|
|
// app->variable_item_list,
|
|
// app->variable_item_list,
|
|
|
// "Save JPEG to ext sdcard:",
|
|
// "Save JPEG to ext sdcard:",
|
|
|
// 2,
|
|
// 2,
|
|
|
- // camera_suite_scene_settings_set_jpeg,
|
|
|
|
|
|
|
+ // camera_suite_scene_cam_settings_set_jpeg,
|
|
|
// app);
|
|
// app);
|
|
|
// value_index = value_index_uint32(app->jpeg, jpeg_value, 2);
|
|
// value_index = value_index_uint32(app->jpeg, jpeg_value, 2);
|
|
|
// variable_item_set_current_value_index(item, value_index);
|
|
// variable_item_set_current_value_index(item, value_index);
|
|
|
// variable_item_set_current_value_text(item, jpeg_text[value_index]);
|
|
// variable_item_set_current_value_text(item, jpeg_text[value_index]);
|
|
|
- UNUSED(camera_suite_scene_settings_set_jpeg);
|
|
|
|
|
|
|
+ UNUSED(camera_suite_scene_cam_settings_set_jpeg);
|
|
|
|
|
|
|
|
- // Haptic FX ON/OFF
|
|
|
|
|
- item = variable_item_list_add(
|
|
|
|
|
- app->variable_item_list, "Haptic FX:", 2, camera_suite_scene_settings_set_haptic, app);
|
|
|
|
|
- value_index = value_index_uint32(app->haptic, haptic_value, 2);
|
|
|
|
|
- variable_item_set_current_value_index(item, value_index);
|
|
|
|
|
- variable_item_set_current_value_text(item, haptic_text[value_index]);
|
|
|
|
|
-
|
|
|
|
|
- // Sound FX ON/OFF
|
|
|
|
|
- item = variable_item_list_add(
|
|
|
|
|
- app->variable_item_list, "Sound FX:", 2, camera_suite_scene_settings_set_speaker, app);
|
|
|
|
|
- value_index = value_index_uint32(app->speaker, speaker_value, 2);
|
|
|
|
|
- variable_item_set_current_value_index(item, value_index);
|
|
|
|
|
- variable_item_set_current_value_text(item, speaker_text[value_index]);
|
|
|
|
|
-
|
|
|
|
|
- // LED FX ON/OFF
|
|
|
|
|
- item = variable_item_list_add(
|
|
|
|
|
- app->variable_item_list, "LED FX:", 2, camera_suite_scene_settings_set_led, app);
|
|
|
|
|
- value_index = value_index_uint32(app->led, led_value, 2);
|
|
|
|
|
- variable_item_set_current_value_index(item, value_index);
|
|
|
|
|
- variable_item_set_current_value_text(item, led_text[value_index]);
|
|
|
|
|
-
|
|
|
|
|
- view_dispatcher_switch_to_view(app->view_dispatcher, CameraSuiteViewIdSettings);
|
|
|
|
|
|
|
+ view_dispatcher_switch_to_view(app->view_dispatcher, CameraSuiteViewIdCamSettings);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-bool camera_suite_scene_settings_on_event(void* context, SceneManagerEvent event) {
|
|
|
|
|
|
|
+bool camera_suite_scene_cam_settings_on_event(void* context, SceneManagerEvent event) {
|
|
|
CameraSuite* app = context;
|
|
CameraSuite* app = context;
|
|
|
UNUSED(app);
|
|
UNUSED(app);
|
|
|
bool consumed = false;
|
|
bool consumed = false;
|
|
@@ -219,8 +146,8 @@ bool camera_suite_scene_settings_on_event(void* context, SceneManagerEvent event
|
|
|
return consumed;
|
|
return consumed;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void camera_suite_scene_settings_on_exit(void* context) {
|
|
|
|
|
|
|
+void camera_suite_scene_cam_settings_on_exit(void* context) {
|
|
|
CameraSuite* app = context;
|
|
CameraSuite* app = context;
|
|
|
variable_item_list_set_selected_item(app->variable_item_list, 0);
|
|
variable_item_list_set_selected_item(app->variable_item_list, 0);
|
|
|
variable_item_list_reset(app->variable_item_list);
|
|
variable_item_list_reset(app->variable_item_list);
|
|
|
-}
|
|
|
|
|
|
|
+}
|