mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-11 06:09:08 -07:00
More format stuff
This commit is contained in:
16
applications/external/ble_spam/ble_spam.c
vendored
16
applications/external/ble_spam/ble_spam.c
vendored
@@ -128,8 +128,8 @@ typedef struct {
|
|||||||
int8_t index;
|
int8_t index;
|
||||||
} State;
|
} State;
|
||||||
|
|
||||||
static int32_t adv_thread(void* ctx) {
|
static int32_t adv_thread(void* _ctx) {
|
||||||
State* state = ctx;
|
State* state = _ctx;
|
||||||
uint8_t size;
|
uint8_t size;
|
||||||
uint16_t delay;
|
uint16_t delay;
|
||||||
uint8_t* packet;
|
uint8_t* packet;
|
||||||
@@ -182,10 +182,14 @@ enum {
|
|||||||
PageAboutCredits = PAGE_MAX,
|
PageAboutCredits = PAGE_MAX,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void draw_callback(Canvas* canvas, void* ctx) {
|
static void draw_callback(Canvas* canvas, void* _ctx) {
|
||||||
State* state = *(State**)ctx;
|
State* state = *(State**)_ctx;
|
||||||
const char* back = "Back";
|
const char* back = "Back";
|
||||||
const char* next = "Next";
|
const char* next = "Next";
|
||||||
|
if(state->index < 0) {
|
||||||
|
back = "Next";
|
||||||
|
next = "Back";
|
||||||
|
}
|
||||||
switch(state->index) {
|
switch(state->index) {
|
||||||
case PageStart - 1:
|
case PageStart - 1:
|
||||||
next = "Spam";
|
next = "Spam";
|
||||||
@@ -315,8 +319,8 @@ static void draw_callback(Canvas* canvas, void* ctx) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool input_callback(InputEvent* input, void* ctx) {
|
static bool input_callback(InputEvent* input, void* _ctx) {
|
||||||
View* view = ctx;
|
View* view = _ctx;
|
||||||
State* state = *(State**)view_get_model(view);
|
State* state = *(State**)view_get_model(view);
|
||||||
bool consumed = false;
|
bool consumed = false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user