mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-14 07:18:35 -07:00
BLE Spam save new custom data only on ok not back
This commit is contained in:
@@ -573,6 +573,8 @@ void scene_continuity_pp_model_on_exit(void* _ctx) {
|
|||||||
|
|
||||||
static void pp_model_custom_callback(void* _ctx) {
|
static void pp_model_custom_callback(void* _ctx) {
|
||||||
Ctx* ctx = _ctx;
|
Ctx* ctx = _ctx;
|
||||||
|
ContinuityCfg* cfg = &ctx->attack->payload.cfg.continuity;
|
||||||
|
cfg->data.proximity_pair.model = (ctx->byte_store[0] << 0x08) + (ctx->byte_store[1] << 0x00);
|
||||||
scene_manager_previous_scene(ctx->scene_manager);
|
scene_manager_previous_scene(ctx->scene_manager);
|
||||||
scene_manager_previous_scene(ctx->scene_manager);
|
scene_manager_previous_scene(ctx->scene_manager);
|
||||||
}
|
}
|
||||||
@@ -597,9 +599,7 @@ bool scene_continuity_pp_model_custom_on_event(void* _ctx, SceneManagerEvent eve
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
void scene_continuity_pp_model_custom_on_exit(void* _ctx) {
|
void scene_continuity_pp_model_custom_on_exit(void* _ctx) {
|
||||||
Ctx* ctx = _ctx;
|
UNUSED(_ctx);
|
||||||
ContinuityCfg* cfg = &ctx->attack->payload.cfg.continuity;
|
|
||||||
cfg->data.proximity_pair.model = (ctx->byte_store[0] << 0x08) + (ctx->byte_store[1] << 0x00);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pp_prefix_callback(void* _ctx, uint32_t index) {
|
static void pp_prefix_callback(void* _ctx, uint32_t index) {
|
||||||
@@ -660,6 +660,8 @@ void scene_continuity_pp_prefix_on_exit(void* _ctx) {
|
|||||||
|
|
||||||
static void pp_prefix_custom_callback(void* _ctx) {
|
static void pp_prefix_custom_callback(void* _ctx) {
|
||||||
Ctx* ctx = _ctx;
|
Ctx* ctx = _ctx;
|
||||||
|
ContinuityCfg* cfg = &ctx->attack->payload.cfg.continuity;
|
||||||
|
cfg->data.proximity_pair.prefix = (ctx->byte_store[0] << 0x00);
|
||||||
scene_manager_previous_scene(ctx->scene_manager);
|
scene_manager_previous_scene(ctx->scene_manager);
|
||||||
scene_manager_previous_scene(ctx->scene_manager);
|
scene_manager_previous_scene(ctx->scene_manager);
|
||||||
}
|
}
|
||||||
@@ -683,9 +685,7 @@ bool scene_continuity_pp_prefix_custom_on_event(void* _ctx, SceneManagerEvent ev
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
void scene_continuity_pp_prefix_custom_on_exit(void* _ctx) {
|
void scene_continuity_pp_prefix_custom_on_exit(void* _ctx) {
|
||||||
Ctx* ctx = _ctx;
|
UNUSED(_ctx);
|
||||||
ContinuityCfg* cfg = &ctx->attack->payload.cfg.continuity;
|
|
||||||
cfg->data.proximity_pair.prefix = (ctx->byte_store[0] << 0x00);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void na_action_callback(void* _ctx, uint32_t index) {
|
static void na_action_callback(void* _ctx, uint32_t index) {
|
||||||
@@ -746,6 +746,8 @@ void scene_continuity_na_action_on_exit(void* _ctx) {
|
|||||||
|
|
||||||
static void na_action_custom_callback(void* _ctx) {
|
static void na_action_custom_callback(void* _ctx) {
|
||||||
Ctx* ctx = _ctx;
|
Ctx* ctx = _ctx;
|
||||||
|
ContinuityCfg* cfg = &ctx->attack->payload.cfg.continuity;
|
||||||
|
cfg->data.nearby_action.action = (ctx->byte_store[0] << 0x00);
|
||||||
scene_manager_previous_scene(ctx->scene_manager);
|
scene_manager_previous_scene(ctx->scene_manager);
|
||||||
scene_manager_previous_scene(ctx->scene_manager);
|
scene_manager_previous_scene(ctx->scene_manager);
|
||||||
}
|
}
|
||||||
@@ -769,9 +771,7 @@ bool scene_continuity_na_action_custom_on_event(void* _ctx, SceneManagerEvent ev
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
void scene_continuity_na_action_custom_on_exit(void* _ctx) {
|
void scene_continuity_na_action_custom_on_exit(void* _ctx) {
|
||||||
Ctx* ctx = _ctx;
|
UNUSED(_ctx);
|
||||||
ContinuityCfg* cfg = &ctx->attack->payload.cfg.continuity;
|
|
||||||
cfg->data.nearby_action.action = (ctx->byte_store[0] << 0x00);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void na_flags_callback(void* _ctx) {
|
static void na_flags_callback(void* _ctx) {
|
||||||
|
|||||||
@@ -384,6 +384,9 @@ void scene_easysetup_buds_model_on_exit(void* _ctx) {
|
|||||||
|
|
||||||
static void buds_model_custom_callback(void* _ctx) {
|
static void buds_model_custom_callback(void* _ctx) {
|
||||||
Ctx* ctx = _ctx;
|
Ctx* ctx = _ctx;
|
||||||
|
EasysetupCfg* cfg = &ctx->attack->payload.cfg.easysetup;
|
||||||
|
cfg->data.buds.model =
|
||||||
|
(ctx->byte_store[0] << 0x10) + (ctx->byte_store[1] << 0x08) + (ctx->byte_store[2] << 0x00);
|
||||||
scene_manager_previous_scene(ctx->scene_manager);
|
scene_manager_previous_scene(ctx->scene_manager);
|
||||||
scene_manager_previous_scene(ctx->scene_manager);
|
scene_manager_previous_scene(ctx->scene_manager);
|
||||||
}
|
}
|
||||||
@@ -409,10 +412,7 @@ bool scene_easysetup_buds_model_custom_on_event(void* _ctx, SceneManagerEvent ev
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
void scene_easysetup_buds_model_custom_on_exit(void* _ctx) {
|
void scene_easysetup_buds_model_custom_on_exit(void* _ctx) {
|
||||||
Ctx* ctx = _ctx;
|
UNUSED(_ctx);
|
||||||
EasysetupCfg* cfg = &ctx->attack->payload.cfg.easysetup;
|
|
||||||
cfg->data.buds.model =
|
|
||||||
(ctx->byte_store[0] << 0x10) + (ctx->byte_store[1] << 0x08) + (ctx->byte_store[2] << 0x00);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void watch_model_callback(void* _ctx, uint32_t index) {
|
static void watch_model_callback(void* _ctx, uint32_t index) {
|
||||||
@@ -473,6 +473,8 @@ void scene_easysetup_watch_model_on_exit(void* _ctx) {
|
|||||||
|
|
||||||
static void watch_model_custom_callback(void* _ctx) {
|
static void watch_model_custom_callback(void* _ctx) {
|
||||||
Ctx* ctx = _ctx;
|
Ctx* ctx = _ctx;
|
||||||
|
EasysetupCfg* cfg = &ctx->attack->payload.cfg.easysetup;
|
||||||
|
cfg->data.watch.model = (ctx->byte_store[0] << 0x00);
|
||||||
scene_manager_previous_scene(ctx->scene_manager);
|
scene_manager_previous_scene(ctx->scene_manager);
|
||||||
scene_manager_previous_scene(ctx->scene_manager);
|
scene_manager_previous_scene(ctx->scene_manager);
|
||||||
}
|
}
|
||||||
@@ -496,7 +498,5 @@ bool scene_easysetup_watch_model_custom_on_event(void* _ctx, SceneManagerEvent e
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
void scene_easysetup_watch_model_custom_on_exit(void* _ctx) {
|
void scene_easysetup_watch_model_custom_on_exit(void* _ctx) {
|
||||||
Ctx* ctx = _ctx;
|
UNUSED(_ctx);
|
||||||
EasysetupCfg* cfg = &ctx->attack->payload.cfg.easysetup;
|
|
||||||
cfg->data.watch.model = (ctx->byte_store[0] << 0x00);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -223,6 +223,9 @@ void scene_fastpair_model_on_exit(void* _ctx) {
|
|||||||
|
|
||||||
static void model_custom_callback(void* _ctx) {
|
static void model_custom_callback(void* _ctx) {
|
||||||
Ctx* ctx = _ctx;
|
Ctx* ctx = _ctx;
|
||||||
|
FastpairCfg* cfg = &ctx->attack->payload.cfg.fastpair;
|
||||||
|
cfg->model =
|
||||||
|
(ctx->byte_store[0] << 0x10) + (ctx->byte_store[1] << 0x08) + (ctx->byte_store[2] << 0x00);
|
||||||
scene_manager_previous_scene(ctx->scene_manager);
|
scene_manager_previous_scene(ctx->scene_manager);
|
||||||
scene_manager_previous_scene(ctx->scene_manager);
|
scene_manager_previous_scene(ctx->scene_manager);
|
||||||
}
|
}
|
||||||
@@ -248,8 +251,5 @@ bool scene_fastpair_model_custom_on_event(void* _ctx, SceneManagerEvent event) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
void scene_fastpair_model_custom_on_exit(void* _ctx) {
|
void scene_fastpair_model_custom_on_exit(void* _ctx) {
|
||||||
Ctx* ctx = _ctx;
|
UNUSED(_ctx);
|
||||||
FastpairCfg* cfg = &ctx->attack->payload.cfg.fastpair;
|
|
||||||
cfg->model =
|
|
||||||
(ctx->byte_store[0] << 0x10) + (ctx->byte_store[1] << 0x08) + (ctx->byte_store[2] << 0x00);
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user