Skip to content

Commit 448aac8

Browse files
authored
Merge pull request #8 from leedave/feature/v1.6
Feature/v1.6
2 parents 6934539 + 254c06d commit 448aac8

File tree

6 files changed

+18
-64
lines changed

6 files changed

+18
-64
lines changed

application.fam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ App(
1111
order=10,
1212
fap_icon="icons/color_guess_10px.png",
1313
fap_icon_assets="icons",
14-
fap_version="1.5",
14+
fap_version="1.6",
1515
fap_category="Games",
1616
fap_author="Leedave",
1717
fap_description="Color Guessing Game",

changelog.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

color_guess.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ ColorGuess* color_guess_app_alloc() {
2424
ColorGuess* app = malloc(sizeof(ColorGuess));
2525
app->gui = furi_record_open(RECORD_GUI);
2626
app->notification = furi_record_open(RECORD_NOTIFICATION);
27-
app->error = false;
28-
27+
2928
// Set Defaults if no config exists
3029
app->haptic = 1;
3130
app->led = 1;
@@ -38,8 +37,6 @@ ColorGuess* color_guess_app_alloc() {
3837

3938
//Scene additions
4039
app->view_dispatcher = view_dispatcher_alloc();
41-
view_dispatcher_enable_queue(app->view_dispatcher);
42-
4340
app->scene_manager = scene_manager_alloc(&color_guess_scene_handlers, app);
4441
view_dispatcher_set_event_callback_context(app->view_dispatcher, app);
4542
view_dispatcher_set_navigation_event_callback(
@@ -111,10 +108,7 @@ void color_guess_app_free(ColorGuess* app) {
111108
int32_t color_guess_app(void* p) {
112109
UNUSED(p);
113110
ColorGuess* app = color_guess_app_alloc();
114-
if(app->error) {
115-
return 255;
116-
}
117-
111+
118112
view_dispatcher_attach_to_gui(app->view_dispatcher, app->gui, ViewDispatcherTypeFullscreen);
119113

120114
scene_manager_next_scene(app->scene_manager, ColorGuessSceneStartscreen);

color_guess.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "views/color_guess_startscreen.h"
1818
#include "helpers/color_guess_storage.h"
1919

20-
#define COLOR_GUESS_VERSION "1.5"
20+
#define COLOR_GUESS_VERSION "1.6"
2121
#define TAG "Color_Guess"
2222

2323
typedef struct {
@@ -32,9 +32,7 @@ typedef struct {
3232
ColorGuessPlay* color_guess_play;
3333
ColorGuessStartscreen* color_guess_startscreen;
3434
Submenu* color_guess_settings;
35-
bool error;
3635
uint32_t haptic;
37-
//uint32_t speaker;
3836
uint32_t led;
3937
uint32_t save_settings;
4038
} ColorGuess;
@@ -52,11 +50,6 @@ typedef enum {
5250
ColorGuessHapticOn,
5351
} ColorGuessHapticState;
5452

55-
typedef enum {
56-
ColorGuessSpeakerOff,
57-
ColorGuessSpeakerOn,
58-
} ColorGuessSpeakerState;
59-
6053
typedef enum {
6154
ColorGuessLedOff,
6255
ColorGuessLedOn,

docs/changelog.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
1-
## 1.5
1+
## v1.6
2+
- Reducing code
3+
- Removal of deprecated view dispatcher queue
4+
5+
## v1.5
26
- Additional Memory Management fixes by Willy-JL
37
- Redraw Issue fixed by Willy-JL
48
- Added GNU License
59
- Added version number
610

7-
## 1.4
8-
- Prevent value changing on win view
9-
- Fix issues with FW build 0.99.x
11+
## v1.4
12+
- Compatibility for FW above 0.99.0
13+
- Fix for Value changing on success screen
1014

11-
## 1.3
12-
- Patched Memory Leak in storage
15+
## v1.3
16+
- Fixed minor memory leak in storage
1317

1418
## v1.2
15-
- Updated compatibility to 0.95.0-rc
19+
- Updated Application for Flipper Zero 0.95.0-rc
1620

1721
## v1.1
18-
- Updated Launch Screen GFX
22+
23+
Added GFX to start screen
1924

2025
## v1.0
2126

scenes/color_guess_scene_settings.c

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,12 @@ const char* const haptic_text[2] = {
1111
"OFF",
1212
"ON",
1313
};
14+
1415
const uint32_t haptic_value[2] = {
1516
ColorGuessHapticOff,
1617
ColorGuessHapticOn,
1718
};
1819

19-
/* Speaker currently not used
20-
const char* const speaker_text[2] = {
21-
"OFF",
22-
"ON",
23-
};
24-
const uint32_t speaker_value[2] = {
25-
ColorGuessSpeakerOff,
26-
ColorGuessSpeakerOn,
27-
};
28-
*/
29-
3020
/* Game doesn't make sense with LED off, but the setting is there */
3121
const char* const led_text[2] = {
3222
"OFF",
@@ -45,15 +35,6 @@ static void color_guess_scene_settings_set_haptic(VariableItem* item) {
4535
app->haptic = haptic_value[index];
4636
}
4737

48-
/*
49-
static void color_guess_scene_settings_set_speaker(VariableItem* item) {
50-
ColorGuess* app = variable_item_get_context(item);
51-
uint8_t index = variable_item_get_current_value_index(item);
52-
variable_item_set_current_value_text(item, speaker_text[index]);
53-
app->speaker = speaker_value[index];
54-
}
55-
*/
56-
5738
static void color_guess_scene_settings_set_led(VariableItem* item) {
5839
ColorGuess* app = variable_item_get_context(item);
5940
uint8_t index = variable_item_get_current_value_index(item);
@@ -78,18 +59,6 @@ void color_guess_scene_settings_on_enter(void* context) {
7859
variable_item_set_current_value_index(item, value_index);
7960
variable_item_set_current_value_text(item, haptic_text[value_index]);
8061

81-
// Sound on/off
82-
/*
83-
item = variable_item_list_add(
84-
app->variable_item_list,
85-
"Sound:",
86-
2,
87-
color_guess_scene_settings_set_speaker,
88-
app);
89-
value_index = value_index_uint32(app->speaker, speaker_value, 2);
90-
variable_item_set_current_value_index(item, value_index);
91-
variable_item_set_current_value_text(item, speaker_text[value_index]);*/
92-
9362
// LED Effects on/off
9463
item = variable_item_list_add(
9564
app->variable_item_list, "LED FX:", 2, color_guess_scene_settings_set_led, app);

0 commit comments

Comments
 (0)