1
mirror of https://github.com/flipperdevices/flipperzero-firmware.git synced 2025-12-13 05:19:50 +04:00

[FL-3679] iButton new UI (#3471)

* iButton new UI
* UI final touches
* Satisfy PVS

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
Astra
2024-04-18 08:05:37 +09:00
committed by GitHub
parent 70f93a48f5
commit 4883383b20
29 changed files with 280 additions and 75 deletions

View File

@@ -325,7 +325,15 @@ static LevelDuration protocol_cyfral_encoder_yield(ProtocolCyfral* proto) {
return result;
}
static void protocol_cyfral_render_uid(FuriString* result, ProtocolCyfral* proto) {
furi_string_cat_printf(result, "ID: ");
for(size_t i = 0; i < CYFRAL_DATA_SIZE; ++i) {
furi_string_cat_printf(result, "%02X ", ((uint8_t*)&proto->data)[i]);
}
}
static void protocol_cyfral_render_brief_data(ProtocolCyfral* proto, FuriString* result) {
furi_string_cat_printf(result, "ID: ");
for(size_t i = 0; i < CYFRAL_DATA_SIZE; ++i) {
furi_string_cat_printf(result, "%02X ", ((uint8_t*)&proto->data)[i]);
}
@@ -348,5 +356,6 @@ const ProtocolBase ibutton_protocol_misc_cyfral = {
.start = (ProtocolEncoderStart)protocol_cyfral_encoder_start,
.yield = (ProtocolEncoderYield)protocol_cyfral_encoder_yield,
},
.render_uid = (ProtocolRenderData)protocol_cyfral_render_uid,
.render_brief_data = (ProtocolRenderData)protocol_cyfral_render_brief_data,
};