BLE Spam save new custom data only on ok not back

This commit is contained in:
Willy-JL
2023-10-24 22:20:06 +01:00
parent f4cb2a087b
commit 60ec667178
3 changed files with 20 additions and 20 deletions

View File

@@ -573,6 +573,8 @@ void scene_continuity_pp_model_on_exit(void* _ctx) {
static void pp_model_custom_callback(void* _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);
}
@@ -597,9 +599,7 @@ bool scene_continuity_pp_model_custom_on_event(void* _ctx, SceneManagerEvent eve
return false;
}
void scene_continuity_pp_model_custom_on_exit(void* _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);
UNUSED(_ctx);
}
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) {
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);
}
@@ -683,9 +685,7 @@ bool scene_continuity_pp_prefix_custom_on_event(void* _ctx, SceneManagerEvent ev
return false;
}
void scene_continuity_pp_prefix_custom_on_exit(void* _ctx) {
Ctx* ctx = _ctx;
ContinuityCfg* cfg = &ctx->attack->payload.cfg.continuity;
cfg->data.proximity_pair.prefix = (ctx->byte_store[0] << 0x00);
UNUSED(_ctx);
}
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) {
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);
}
@@ -769,9 +771,7 @@ bool scene_continuity_na_action_custom_on_event(void* _ctx, SceneManagerEvent ev
return false;
}
void scene_continuity_na_action_custom_on_exit(void* _ctx) {
Ctx* ctx = _ctx;
ContinuityCfg* cfg = &ctx->attack->payload.cfg.continuity;
cfg->data.nearby_action.action = (ctx->byte_store[0] << 0x00);
UNUSED(_ctx);
}
static void na_flags_callback(void* _ctx) {

View File

@@ -384,6 +384,9 @@ void scene_easysetup_buds_model_on_exit(void* _ctx) {
static void buds_model_custom_callback(void* _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);
}
@@ -409,10 +412,7 @@ bool scene_easysetup_buds_model_custom_on_event(void* _ctx, SceneManagerEvent ev
return false;
}
void scene_easysetup_buds_model_custom_on_exit(void* _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);
UNUSED(_ctx);
}
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) {
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);
}
@@ -496,7 +498,5 @@ bool scene_easysetup_watch_model_custom_on_event(void* _ctx, SceneManagerEvent e
return false;
}
void scene_easysetup_watch_model_custom_on_exit(void* _ctx) {
Ctx* ctx = _ctx;
EasysetupCfg* cfg = &ctx->attack->payload.cfg.easysetup;
cfg->data.watch.model = (ctx->byte_store[0] << 0x00);
UNUSED(_ctx);
}

View File

@@ -223,6 +223,9 @@ void scene_fastpair_model_on_exit(void* _ctx) {
static void model_custom_callback(void* _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);
}
@@ -248,8 +251,5 @@ bool scene_fastpair_model_custom_on_event(void* _ctx, SceneManagerEvent event) {
return false;
}
void scene_fastpair_model_custom_on_exit(void* _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);
UNUSED(_ctx);
}