Compare commits

...
18 Commits
Author SHA1 Message Date
Skorpionmandあく 48e4de1213 [FL-3743] SubGhz: UI update (#3352)
* [FL-3743]SubGhz: screen refactoring
* SubGhz: fix syntax
* SubGhz: gui
* SubGhz: add animation icon ant in read_info scene
* SubGhz: up speed animation icon

Co-authored-by: あく <alleteam@gmail.com>
2024-01-14 13:58:29 +09:00
hedgerandあく 0789cbdefa assets: checking limits on image size; ufbt: cdb target (#3359)
* scripts: assets: checking limits on image size
* ufbt: added "cdb" target for regenerating; also generating cdb on "vscode_dist"
* fbt: now also creating cdb for vscode_dist

Co-authored-by: あく <alleteam@gmail.com>
2024-01-12 17:58:37 +09:00
Leptopt1losandgornekich d289545bf8 NFC: system dict skip when user dict is skipped fix (#3356)
* NFC: system dict skip when user dict is skipped fix
* MFC poller allocator fix (by gornekich)

Co-authored-by: gornekich <n.gorbadey@gmail.com>
2024-01-12 17:41:19 +09:00
Skorpionmandあく 34539cda17 FuriHal: fix start duration furi_hal_subghz_async_tx (#3230)
* FuriHal: fix start duration furi_hal_subghz_async_tx
* FuriHal: add check min duration arr for the first level
* FuriHal: fix conflict dev
* SubGhz: fix unit_test
* FuriHal: subghz internal fix start/stop transmit duration
* Drivers: subghz external fix start/stop transmit duration
* FuriHal: subghz optimization
* SubGhz: fix unit_test subghz
* FuriHal: subghz fix end duration if size == size dma buf
* FuriHal: revert enum values order, remove garbage
* FuriHal: revert one more small bit in subghz
* FuriHal: handle various corner cases in subghz transmission
* FuriHal: cleanup subghz code
* FuriHal: add parenthesis around value in subghz defines
* FuriHal: add packer subghz_async_tx
* FuriHal: more reliable subghz transmission end handling, fixes stuck transmission
* FuriHal: add subghz crutch docs, and rename some defines to conform naming standards
* FuriHal: subghz,  the logic of timers has been changed. disabling the shadow register ARR
* FuriHal: fix subghz off dma irq
* SubGhzExt: fun rename
* FuriHal,SubGhz: fix g0 state on reset, fix incorrect async_tx stop sequence, remove dead code.

Co-authored-by: あく <alleteam@gmail.com>
2024-01-11 16:56:14 +09:00
0b15fc3807 Fix MyKey production date parsing (#3332)
Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-01-10 22:49:30 +09:00
4d99a454fd NFC: parsers minor cleanup (#3329)
* WashCity cards parser cleanup
* umarsh includes cleanup

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-01-10 20:55:45 +09:00
3452fbc351 [FL-3744] [NFC] Ntag success write freeze when not saved card (#3354)
* New scenes for ultralight poller write mode
* Added new button and transition logic for write operation
  For now write is only possible for NTAG21x cards with default password and no AUTHLIM set
* Poller states extended
* Enums and datatypes extended for new poller mode
* Added mode field to poller instance datatype
* New states for poller added in order to implement write mode
* Added new event type for locked cards in order to simplify state flow
* New logic for poller write commands
* Scenes adjustments
* Scenes renamed
* New field added to poller instance
* Now we write in 'page per call' mode
* Now function takes callback return value into account
* Callback will be called only in write mode
* Event type added
* Log adjusted and start page to write set
* Logs added and check in now false at start, then it moves to true
* Now mf_ultralight_poller_handler_request_write_data halts card in case of check failure and stops poller
* All fail events now returns NfcCommandStop callback
* In case of fail we move back properly
* Remove garbage
* Fix moving to previous screen in case of not saved ultralight

Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: あく <alleteam@gmail.com>
2024-01-10 20:46:55 +09:00
hedger 8c04947aa2 ufbt: fixed generated project paths on Windows (#3339) 2024-01-10 20:37:28 +09:00
あく 7eeb60e17e Desktop: fix rpc unlock on pin input screen (#3334) 2024-01-03 17:00:56 +04:00
d511d76a1b [FL-3678] [FL-3733] [FL-3723] UI refactor (#3323)
* Added new image DolphinSaved_113x58.png for all "saved" pages
* New image DolphinDone_80x58.png added
* Replaced dolphins on all scenes accroding to new UI specs
* New success dolphin image added
* Success scene image replaced
* Changed image and text for update initial scene
* Image and text adjusted for "Original restored" scene
* Removed old DolphinNice_96x59.png image
* New image for LFRFID scene
* Removed unused image
* New UI image added to assets
* Replaced warning dolphin on mf_classic write initial fail scene
* Removed old image
* Changed image on scenes to a new one
* New dolphin mafia image
* Replaced dolphin mafia image to a new one
* Removed DolphinMafia_115x62.png
* New check symbol on completed state for detect_reader
* Adjusted layout elements position
* Removed second switching to popup view in order to achieve control in support callbacks
In general now we show generic scene and after that in on_enter callback we can redefine it for particular protocol
* CardDetected event now also triggers on_event callback
* Now on AuthRequest we throw CardDetected custom event
* Added callback for read_on_event
* Now we show different screen while reading and unlocking
* Fixed missing asstes for some scenes
* Update DolphinMafia_119x62.png
* Adjusted all the scenes with DolphinMafia image
* Scenes with save image adjusted
* Removed unnecessary assets DolphinMafia_119x62.png and DolphinSaved_113x58.png
* All common dolphins moved to Dolphin folder
* Moved DolphinReadingSuccess_59x63.png to Dolphin folder
* Set proper led color for detect and read scenes
* Added new notification sequence for semi_success results
* Use new sequence for semi_success nfc reads
* Different events are now throwed depending on read result
* Added handling of incomplete event for ultralight cards
* Replaced image for iButton scene
* Updated API for f18
* Fixed issue with unlock retry sequence
* Fix after review
* Success notification replaced to semi success in case of incomplete mf classic reading
* New text for read scene
* New read result sound notification logic for mf classic cards

Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
2024-01-02 15:43:46 +09:00
gornekich a7b60bf2a6 MFC emulation fixes (#3324)
* mf classic listener: fix write block
* nfc: go to idle state instead of sleep
* lib nfc: fix documentation
2023-12-29 12:24:20 +09:00
あく 895694c624 Scripts: fix incorrect handling of storage stress test count option (#3321) 2023-12-28 19:15:07 +09:00
Arthur Braghettoandあく 2a0a54a224 Add Samsung AC remotes DB93 and AR-EH04 (#3301)
Co-authored-by: あく <alleteam@gmail.com>
2023-12-28 14:35:01 +09:00
YaBaandあく 35e74c07d1 Added NFC plugin; parser for WashCity cards. (#3319)
* Added NFC plugin; parser for WashCity cards.
* Fixed file to the correct path
* Added demo file Demo_WC_20E.nfc
* Fixed clang format
* fixed typo (balance_cents)
* Removed demo file as requested.

Co-authored-by: あく <alleteam@gmail.com>
2023-12-28 14:23:12 +09:00
ry4000andあく f6a38352e8 Update mf_classic_dict.nfc (#3314)
This Commit proposes the addition of the 33 Bandai Namco Passport / Sega Aime Card static access keys that has been available to Members of the Flipper Devices Discord Server; for convenience, they are listed in Sector Key A/B order.

Sector 0 Key B has two possible access keys;
019761AA8082 [current Bandai Namco Passports]
574343467632 [Sega Aime Cards / early-edition Bandai Namco Passports]

Co-authored-by: あく <alleteam@gmail.com>
2023-12-28 14:12:13 +09:00
Eric Bettsandあく 76ed466eb4 Nfc: HID MFC Plugin (#3312)
Co-authored-by: あく <alleteam@gmail.com>
2023-12-28 14:03:50 +09:00
あく c9e3f20314 [FL-3429] About: cn,tw,mx certification information (#3318) 2023-12-26 15:12:17 +09:00
あく 0084443ed7 [FL-3727] RPC: reverse input (#3304)
* RPC: reverse input
* Assets: sync protobuf
2023-12-26 14:09:10 +09:00
137 changed files with 1355 additions and 505 deletions
+1 -1
View File
@@ -369,7 +369,7 @@ vscode_dist = distenv.Install(
)
distenv.Precious(vscode_dist)
distenv.NoClean(vscode_dist)
distenv.Alias("vscode_dist", vscode_dist)
distenv.Alias("vscode_dist", (vscode_dist, firmware_env["FW_CDB"]))
# Configure shell with build tools
distenv.PhonyTarget(
@@ -231,17 +231,17 @@ typedef struct {
size_t pos;
} SubGhzHalAsyncTxTest;
#define SUBGHZ_HAL_TEST_DURATION 1
#define SUBGHZ_HAL_TEST_DURATION 3
static LevelDuration subghz_hal_async_tx_test_yield(void* context) {
SubGhzHalAsyncTxTest* test = context;
bool is_odd = test->pos % 2;
if(test->type == SubGhzHalAsyncTxTestTypeNormal) {
if(test->pos < API_HAL_SUBGHZ_ASYNC_TX_BUFFER_FULL * 8) {
if(test->pos < FURI_HAL_SUBGHZ_ASYNC_TX_BUFFER_FULL * 8) {
test->pos++;
return level_duration_make(is_odd, SUBGHZ_HAL_TEST_DURATION);
} else if(test->pos == API_HAL_SUBGHZ_ASYNC_TX_BUFFER_FULL * 8) {
} else if(test->pos == FURI_HAL_SUBGHZ_ASYNC_TX_BUFFER_FULL * 8) {
test->pos++;
return level_duration_reset();
} else {
@@ -251,36 +251,36 @@ static LevelDuration subghz_hal_async_tx_test_yield(void* context) {
if(test->pos == 0) {
test->pos++;
return level_duration_make(!is_odd, SUBGHZ_HAL_TEST_DURATION);
} else if(test->pos < API_HAL_SUBGHZ_ASYNC_TX_BUFFER_FULL * 8) {
} else if(test->pos < FURI_HAL_SUBGHZ_ASYNC_TX_BUFFER_FULL * 8) {
test->pos++;
return level_duration_make(is_odd, SUBGHZ_HAL_TEST_DURATION);
} else if(test->pos == API_HAL_SUBGHZ_ASYNC_TX_BUFFER_FULL * 8) {
} else if(test->pos == FURI_HAL_SUBGHZ_ASYNC_TX_BUFFER_FULL * 8) {
test->pos++;
return level_duration_reset();
} else {
furi_crash("Yield after reset");
}
} else if(test->type == SubGhzHalAsyncTxTestTypeInvalidMid) {
if(test->pos == API_HAL_SUBGHZ_ASYNC_TX_BUFFER_HALF / 2) {
if(test->pos == FURI_HAL_SUBGHZ_ASYNC_TX_BUFFER_HALF / 2) {
test->pos++;
return level_duration_make(!is_odd, SUBGHZ_HAL_TEST_DURATION);
} else if(test->pos < API_HAL_SUBGHZ_ASYNC_TX_BUFFER_FULL * 8) {
} else if(test->pos < FURI_HAL_SUBGHZ_ASYNC_TX_BUFFER_FULL * 8) {
test->pos++;
return level_duration_make(is_odd, SUBGHZ_HAL_TEST_DURATION);
} else if(test->pos == API_HAL_SUBGHZ_ASYNC_TX_BUFFER_FULL * 8) {
} else if(test->pos == FURI_HAL_SUBGHZ_ASYNC_TX_BUFFER_FULL * 8) {
test->pos++;
return level_duration_reset();
} else {
furi_crash("Yield after reset");
}
} else if(test->type == SubGhzHalAsyncTxTestTypeInvalidEnd) {
if(test->pos == API_HAL_SUBGHZ_ASYNC_TX_BUFFER_FULL - 1) {
if(test->pos == FURI_HAL_SUBGHZ_ASYNC_TX_BUFFER_FULL - 1) {
test->pos++;
return level_duration_make(!is_odd, SUBGHZ_HAL_TEST_DURATION);
} else if(test->pos < API_HAL_SUBGHZ_ASYNC_TX_BUFFER_FULL * 8) {
} else if(test->pos < FURI_HAL_SUBGHZ_ASYNC_TX_BUFFER_FULL * 8) {
test->pos++;
return level_duration_make(is_odd, SUBGHZ_HAL_TEST_DURATION);
} else if(test->pos == API_HAL_SUBGHZ_ASYNC_TX_BUFFER_FULL * 8) {
} else if(test->pos == FURI_HAL_SUBGHZ_ASYNC_TX_BUFFER_FULL * 8) {
test->pos++;
return level_duration_reset();
} else {
@@ -294,20 +294,20 @@ static LevelDuration subghz_hal_async_tx_test_yield(void* context) {
furi_crash("Yield after reset");
}
} else if(test->type == SubGhzHalAsyncTxTestTypeResetMid) {
if(test->pos < API_HAL_SUBGHZ_ASYNC_TX_BUFFER_HALF / 2) {
if(test->pos < FURI_HAL_SUBGHZ_ASYNC_TX_BUFFER_HALF / 2) {
test->pos++;
return level_duration_make(is_odd, SUBGHZ_HAL_TEST_DURATION);
} else if(test->pos == API_HAL_SUBGHZ_ASYNC_TX_BUFFER_HALF / 2) {
} else if(test->pos == FURI_HAL_SUBGHZ_ASYNC_TX_BUFFER_HALF / 2) {
test->pos++;
return level_duration_reset();
} else {
furi_crash("Yield after reset");
}
} else if(test->type == SubGhzHalAsyncTxTestTypeResetEnd) {
if(test->pos < API_HAL_SUBGHZ_ASYNC_TX_BUFFER_FULL - 1) {
if(test->pos < FURI_HAL_SUBGHZ_ASYNC_TX_BUFFER_FULL) {
test->pos++;
return level_duration_make(is_odd, SUBGHZ_HAL_TEST_DURATION);
} else if(test->pos == API_HAL_SUBGHZ_ASYNC_TX_BUFFER_FULL - 1) {
} else if(test->pos == FURI_HAL_SUBGHZ_ASYNC_TX_BUFFER_FULL) {
test->pos++;
return level_duration_reset();
} else {
@@ -334,6 +334,8 @@ bool subghz_hal_async_tx_test_run(SubGhzHalAsyncTxTestType type) {
while(!furi_hal_subghz_is_async_tx_complete()) {
if(furi_hal_cortex_timer_is_expired(timer)) {
furi_hal_subghz_stop_async_tx();
furi_hal_subghz_sleep();
return false;
}
furi_delay_ms(10);
@@ -18,14 +18,14 @@
#define TAG "SubGhzDeviceCc1101Ext"
#define SUBGHZ_DEVICE_CC1101_EXT_TX_GPIO &gpio_ext_pb2
#define SUBGHZ_DEVICE_CC1101_EXT_TX_GPIO (&gpio_ext_pb2)
/* DMA Channels definition */
#define SUBGHZ_DEVICE_CC1101_EXT_DMA DMA2
#define SUBGHZ_DEVICE_CC1101_EXT_DMA_CH3_CHANNEL LL_DMA_CHANNEL_3
#define SUBGHZ_DEVICE_CC1101_EXT_DMA_CH4_CHANNEL LL_DMA_CHANNEL_4
#define SUBGHZ_DEVICE_CC1101_EXT_DMA_CH5_CHANNEL LL_DMA_CHANNEL_5
#define SUBGHZ_DEVICE_CC1101_EXT_DMA_CH3_IRQ FuriHalInterruptIdDma2Ch3
#define SUBGHZ_DEVICE_CC1101_EXT_DMA (DMA2)
#define SUBGHZ_DEVICE_CC1101_EXT_DMA_CH3_CHANNEL (LL_DMA_CHANNEL_3)
#define SUBGHZ_DEVICE_CC1101_EXT_DMA_CH4_CHANNEL (LL_DMA_CHANNEL_4)
#define SUBGHZ_DEVICE_CC1101_EXT_DMA_CH5_CHANNEL (LL_DMA_CHANNEL_5)
#define SUBGHZ_DEVICE_CC1101_EXT_DMA_CH3_IRQ (FuriHalInterruptIdDma2Ch3)
#define SUBGHZ_DEVICE_CC1101_EXT_DMA_CH3_DEF \
SUBGHZ_DEVICE_CC1101_EXT_DMA, SUBGHZ_DEVICE_CC1101_EXT_DMA_CH3_CHANNEL
#define SUBGHZ_DEVICE_CC1101_EXT_DMA_CH4_DEF \
@@ -34,10 +34,10 @@
SUBGHZ_DEVICE_CC1101_EXT_DMA, SUBGHZ_DEVICE_CC1101_EXT_DMA_CH5_CHANNEL
/** Low level buffer dimensions and guard times */
#define SUBGHZ_DEVICE_CC1101_EXT_ASYNC_TX_BUFFER_FULL (256)
#define SUBGHZ_DEVICE_CC1101_EXT_ASYNC_TX_BUFFER_FULL (256u)
#define SUBGHZ_DEVICE_CC1101_EXT_ASYNC_TX_BUFFER_HALF \
(SUBGHZ_DEVICE_CC1101_EXT_ASYNC_TX_BUFFER_FULL / 2)
#define SUBGHZ_DEVICE_CC1101_EXT_ASYNC_TX_GUARD_TIME 999 << 1
#define SUBGHZ_DEVICE_CC1101_EXT_ASYNC_TX_GUARD_TIME (999u >> 1)
/** SubGhz state */
typedef enum {
@@ -55,13 +55,25 @@ typedef enum {
SubGhzDeviceCC1101ExtRegulationTxRx, /**TxRx*/
} SubGhzDeviceCC1101ExtRegulation;
typedef enum {
SubGhzDeviceCC1101ExtAsyncTxMiddlewareStateIdle,
SubGhzDeviceCC1101ExtAsyncTxMiddlewareStateReset,
SubGhzDeviceCC1101ExtAsyncTxMiddlewareStateRun,
} SubGhzDeviceCC1101ExtAsyncTxMiddlewareState;
typedef struct {
SubGhzDeviceCC1101ExtAsyncTxMiddlewareState state;
bool is_odd_level;
uint32_t adder_duration;
} SubGhzDeviceCC1101ExtAsyncTxMiddleware;
typedef struct {
uint32_t* buffer;
LevelDuration carry_ld;
SubGhzDeviceCC1101ExtCallback callback;
void* callback_context;
uint32_t gpio_tx_buff[2];
uint32_t debug_gpio_buff[2];
SubGhzDeviceCC1101ExtAsyncTxMiddleware middleware;
} SubGhzDeviceCC1101ExtAsyncTx;
typedef struct {
@@ -259,8 +271,8 @@ void subghz_device_cc1101_ext_dump_state() {
void subghz_device_cc1101_ext_load_custom_preset(const uint8_t* preset_data) {
//load config
subghz_device_cc1101_ext_reset();
furi_hal_spi_acquire(subghz_device_cc1101_ext->spi_bus_handle);
cc1101_reset(subghz_device_cc1101_ext->spi_bus_handle);
uint32_t i = 0;
uint8_t pa[8] = {0};
while(preset_data[i]) {
@@ -289,8 +301,8 @@ void subghz_device_cc1101_ext_load_custom_preset(const uint8_t* preset_data) {
}
void subghz_device_cc1101_ext_load_registers(const uint8_t* data) {
subghz_device_cc1101_ext_reset();
furi_hal_spi_acquire(subghz_device_cc1101_ext->spi_bus_handle);
cc1101_reset(subghz_device_cc1101_ext->spi_bus_handle);
uint32_t i = 0;
while(data[i]) {
cc1101_write_reg(subghz_device_cc1101_ext->spi_bus_handle, data[i], data[i + 1]);
@@ -371,6 +383,7 @@ void subghz_device_cc1101_ext_reset() {
furi_hal_gpio_init(subghz_device_cc1101_ext->g0_pin, GpioModeAnalog, GpioPullNo, GpioSpeedLow);
cc1101_switch_to_idle(subghz_device_cc1101_ext->spi_bus_handle);
cc1101_reset(subghz_device_cc1101_ext->spi_bus_handle);
// Warning: push pull cc1101 clock output on GD0
cc1101_write_reg(
subghz_device_cc1101_ext->spi_bus_handle, CC1101_IOCFG0, CC1101IocfgHighImpedance);
furi_hal_spi_release(subghz_device_cc1101_ext->spi_bus_handle);
@@ -563,50 +576,91 @@ void subghz_device_cc1101_ext_stop_async_rx() {
furi_hal_gpio_init(subghz_device_cc1101_ext->g0_pin, GpioModeAnalog, GpioPullNo, GpioSpeedLow);
}
static void subghz_device_cc1101_ext_async_tx_refill(uint32_t* buffer, size_t samples) {
furi_assert(subghz_device_cc1101_ext->state == SubGhzDeviceCC1101ExtStateAsyncTx);
while(samples > 0) {
bool is_odd = samples % 2;
LevelDuration ld;
if(level_duration_is_reset(subghz_device_cc1101_ext->async_tx.carry_ld)) {
ld = subghz_device_cc1101_ext->async_tx.callback(
subghz_device_cc1101_ext->async_tx.callback_context);
} else {
ld = subghz_device_cc1101_ext->async_tx.carry_ld;
subghz_device_cc1101_ext->async_tx.carry_ld = level_duration_reset();
void subghz_device_cc1101_ext_async_tx_middleware_idle(
SubGhzDeviceCC1101ExtAsyncTxMiddleware* middleware) {
middleware->state = SubGhzDeviceCC1101ExtAsyncTxMiddlewareStateIdle;
middleware->is_odd_level = false;
middleware->adder_duration = SUBGHZ_DEVICE_CC1101_EXT_ASYNC_TX_GUARD_TIME;
}
static inline uint32_t subghz_device_cc1101_ext_async_tx_middleware_get_duration(
SubGhzDeviceCC1101ExtAsyncTxMiddleware* middleware,
SubGhzDeviceCC1101ExtCallback callback) {
uint32_t ret = 0;
bool is_level = false;
if(middleware->state == SubGhzDeviceCC1101ExtAsyncTxMiddlewareStateReset) return 0;
while(1) {
LevelDuration ld = callback(subghz_device_cc1101_ext->async_tx.callback_context);
if(level_duration_is_reset(ld)) {
middleware->state = SubGhzDeviceCC1101ExtAsyncTxMiddlewareStateReset;
if(!middleware->is_odd_level) {
return 0;
} else {
return middleware->adder_duration;
}
} else if(level_duration_is_wait(ld)) {
middleware->is_odd_level = !middleware->is_odd_level;
ret = middleware->adder_duration + SUBGHZ_DEVICE_CC1101_EXT_ASYNC_TX_GUARD_TIME;
middleware->adder_duration = 0;
return ret;
}
if(level_duration_is_wait(ld)) {
*buffer = SUBGHZ_DEVICE_CC1101_EXT_ASYNC_TX_GUARD_TIME;
buffer++;
samples--;
} else if(level_duration_is_reset(ld)) {
is_level = level_duration_get_level(ld);
if(middleware->state == SubGhzDeviceCC1101ExtAsyncTxMiddlewareStateIdle) {
if(is_level != middleware->is_odd_level) {
middleware->state = SubGhzDeviceCC1101ExtAsyncTxMiddlewareStateRun;
middleware->is_odd_level = is_level;
middleware->adder_duration = level_duration_get_duration(ld);
return SUBGHZ_DEVICE_CC1101_EXT_ASYNC_TX_GUARD_TIME;
} else {
continue;
}
}
if(middleware->state == SubGhzDeviceCC1101ExtAsyncTxMiddlewareStateRun) {
if(is_level == middleware->is_odd_level) {
middleware->adder_duration += level_duration_get_duration(ld);
continue;
} else {
middleware->is_odd_level = is_level;
ret = middleware->adder_duration;
middleware->adder_duration = level_duration_get_duration(ld);
return ret;
}
}
}
}
static void subghz_device_cc1101_ext_async_tx_refill(uint32_t* buffer, size_t samples) {
furi_assert(subghz_device_cc1101_ext->state == SubGhzDeviceCC1101ExtStateAsyncTx);
while(samples > 0) {
volatile uint32_t duration = subghz_device_cc1101_ext_async_tx_middleware_get_duration(
&subghz_device_cc1101_ext->async_tx.middleware,
subghz_device_cc1101_ext->async_tx.callback);
if(duration == 0) {
*buffer = 0;
buffer++;
samples--;
LL_DMA_DisableIT_HT(SUBGHZ_DEVICE_CC1101_EXT_DMA_CH3_DEF);
LL_DMA_DisableIT_TC(SUBGHZ_DEVICE_CC1101_EXT_DMA_CH3_DEF);
if(LL_DMA_IsActiveFlag_HT3(SUBGHZ_DEVICE_CC1101_EXT_DMA)) {
LL_DMA_ClearFlag_HT3(SUBGHZ_DEVICE_CC1101_EXT_DMA);
}
if(LL_DMA_IsActiveFlag_TC3(SUBGHZ_DEVICE_CC1101_EXT_DMA)) {
LL_DMA_ClearFlag_TC3(SUBGHZ_DEVICE_CC1101_EXT_DMA);
}
LL_TIM_EnableIT_UPDATE(TIM17);
break;
} else {
bool level = level_duration_get_level(ld);
// Inject guard time if level is incorrect
if(is_odd != level) {
*buffer = SUBGHZ_DEVICE_CC1101_EXT_ASYNC_TX_GUARD_TIME;
buffer++;
samples--;
// Special case: prevent buffer overflow if sample is last
if(samples == 0) {
subghz_device_cc1101_ext->async_tx.carry_ld = ld;
break;
}
}
uint32_t duration = level_duration_get_duration(ld);
furi_assert(duration > 0);
*buffer = duration >> 1;
// Lowest possible value is 4us
if(duration < 4) duration = 4;
// Divide by 2 since timer resolution is 2us
// Subtract 1 since we counting from 0
*buffer = (duration >> 1) - 1;
buffer++;
samples--;
}
@@ -638,12 +692,14 @@ static void subghz_device_cc1101_ext_async_tx_dma_isr() {
static void subghz_device_cc1101_ext_async_tx_timer_isr() {
if(LL_TIM_IsActiveFlag_UPDATE(TIM17)) {
if(LL_TIM_GetAutoReload(TIM17) == 0) {
LL_DMA_DisableChannel(SUBGHZ_DEVICE_CC1101_EXT_DMA_CH3_DEF);
furi_hal_gpio_write(subghz_device_cc1101_ext->g0_pin, false);
if(subghz_device_cc1101_ext->async_mirror_pin != NULL)
furi_hal_gpio_write(subghz_device_cc1101_ext->async_mirror_pin, false);
LL_TIM_DisableCounter(TIM17);
subghz_device_cc1101_ext->state = SubGhzDeviceCC1101ExtStateAsyncTxEnd;
if(subghz_device_cc1101_ext->state == SubGhzDeviceCC1101ExtStateAsyncTx) {
LL_DMA_DisableChannel(SUBGHZ_DEVICE_CC1101_EXT_DMA_CH3_DEF);
subghz_device_cc1101_ext->state = SubGhzDeviceCC1101ExtStateAsyncTxEnd;
furi_hal_gpio_write(subghz_device_cc1101_ext->g0_pin, false);
if(subghz_device_cc1101_ext->async_mirror_pin != NULL)
furi_hal_gpio_write(subghz_device_cc1101_ext->async_mirror_pin, false);
LL_TIM_DisableCounter(TIM17);
}
}
LL_TIM_ClearFlag_UPDATE(TIM17);
}
@@ -693,16 +749,18 @@ bool subghz_device_cc1101_ext_start_async_tx(SubGhzDeviceCC1101ExtCallback callb
// Configure TIM
// Set the timer resolution to 2 us
LL_TIM_SetPrescaler(TIM17, (64 << 1) - 1);
LL_TIM_SetCounterMode(TIM17, LL_TIM_COUNTERMODE_UP);
LL_TIM_SetAutoReload(TIM17, 0xFFFF);
LL_TIM_SetClockDivision(TIM17, LL_TIM_CLOCKDIVISION_DIV1);
LL_TIM_SetAutoReload(TIM17, 500);
LL_TIM_SetPrescaler(TIM17, (64 << 1) - 1);
LL_TIM_SetClockSource(TIM17, LL_TIM_CLOCKSOURCE_INTERNAL);
LL_TIM_DisableARRPreload(TIM17);
furi_hal_interrupt_set_isr(
FuriHalInterruptIdTim1TrgComTim17, subghz_device_cc1101_ext_async_tx_timer_isr, NULL);
subghz_device_cc1101_ext_async_tx_middleware_idle(
&subghz_device_cc1101_ext->async_tx.middleware);
subghz_device_cc1101_ext_async_tx_refill(
subghz_device_cc1101_ext->async_tx.buffer, SUBGHZ_DEVICE_CC1101_EXT_ASYNC_TX_BUFFER_FULL);
@@ -748,7 +806,6 @@ bool subghz_device_cc1101_ext_start_async_tx(SubGhzDeviceCC1101ExtCallback callb
// Start counter
LL_TIM_EnableDMAReq_UPDATE(TIM17);
LL_TIM_GenerateEvent_UPDATE(TIM17);
subghz_device_cc1101_ext_tx();
@@ -767,11 +824,15 @@ void subghz_device_cc1101_ext_stop_async_tx() {
subghz_device_cc1101_ext->state == SubGhzDeviceCC1101ExtStateAsyncTx ||
subghz_device_cc1101_ext->state == SubGhzDeviceCC1101ExtStateAsyncTxEnd);
// Deinitialize GPIO
furi_hal_gpio_write(subghz_device_cc1101_ext->g0_pin, false);
furi_hal_gpio_init(
subghz_device_cc1101_ext->g0_pin, GpioModeAnalog, GpioPullDown, GpioSpeedLow);
// Shutdown radio
subghz_device_cc1101_ext_idle();
// Deinitialize Timer
FURI_CRITICAL_ENTER();
furi_hal_bus_disable(FuriHalBusTIM17);
furi_hal_interrupt_set_isr(FuriHalInterruptIdTim1TrgComTim17, NULL, NULL);
@@ -780,17 +841,11 @@ void subghz_device_cc1101_ext_stop_async_tx() {
LL_DMA_DisableChannel(SUBGHZ_DEVICE_CC1101_EXT_DMA_CH4_DEF);
furi_hal_interrupt_set_isr(SUBGHZ_DEVICE_CC1101_EXT_DMA_CH3_IRQ, NULL, NULL);
// Deinitialize GPIO
furi_hal_gpio_write(subghz_device_cc1101_ext->g0_pin, false);
furi_hal_gpio_init(subghz_device_cc1101_ext->g0_pin, GpioModeAnalog, GpioPullNo, GpioSpeedLow);
// Stop debug
if(subghz_device_cc1101_ext_stop_debug()) {
LL_DMA_DisableChannel(SUBGHZ_DEVICE_CC1101_EXT_DMA_CH5_DEF);
}
FURI_CRITICAL_EXIT();
free(subghz_device_cc1101_ext->async_tx.buffer);
subghz_device_cc1101_ext->state = SubGhzDeviceCC1101ExtStateIdle;
@@ -9,9 +9,8 @@ void ibutton_scene_delete_success_on_enter(void* context) {
iButton* ibutton = context;
Popup* popup = ibutton->popup;
popup_set_icon(popup, 0, 2, &I_DolphinMafia_115x62);
popup_set_header(popup, "Deleted", 83, 19, AlignLeft, AlignBottom);
popup_set_icon(popup, 0, 2, &I_DolphinMafia_119x62);
popup_set_header(popup, "Deleted", 80, 19, AlignLeft, AlignBottom);
popup_set_callback(popup, ibutton_scene_delete_success_popup_callback);
popup_set_context(popup, ibutton);
popup_set_timeout(popup, 1500);
@@ -9,9 +9,8 @@ void ibutton_scene_save_success_on_enter(void* context) {
iButton* ibutton = context;
Popup* popup = ibutton->popup;
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
popup_set_header(popup, "Saved!", 5, 7, AlignLeft, AlignTop);
popup_set_icon(popup, 36, 5, &I_DolphinSaved_92x58);
popup_set_header(popup, "Saved", 15, 19, AlignLeft, AlignBottom);
popup_set_callback(popup, ibutton_scene_save_success_popup_callback);
popup_set_context(popup, ibutton);
popup_set_timeout(popup, 1500);
@@ -10,7 +10,7 @@ void ibutton_scene_write_success_on_enter(void* context) {
iButton* ibutton = context;
Popup* popup = ibutton->popup;
popup_set_icon(popup, 0, 12, &I_iButtonDolphinVerySuccess_108x52);
popup_set_icon(popup, 0, 9, &I_iButtonDolphinVerySuccess_92x55);
popup_set_text(popup, "Successfully written!", 40, 12, AlignLeft, AlignBottom);
popup_set_callback(popup, ibutton_scene_write_success_popup_callback);
@@ -712,3 +712,79 @@ type: raw
frequency: 38000
duty_cycle: 0.330000
data: 8425 4291 542 1401 544 538 542 1404 518 1427 544 534 570 540 516 1434 542 1399 544 539 544 539 541 1403 541 1402 516 570 517 1427 545 566 511 1406 517 1431 542 534 544 1406 543 536 517 567 543 1404 542 1400 595 525 544 1405 542 534 516 1433 516 1428 544 537 544 535 543 1403 542 505 488 21084 8424 4298 566 535 569 1402 567 533 568 537 570 1403 570 1403 565 534 566 537 566 1402 569 1398 569 533 569 538 592 1446 569 535 570 1400 569 567 535 535 568 1437 568 533 568 1398 569 1402 565 533 567 534 569 1403 568 536 569 1402 568 535 567 534 571 1403 568 1415 566 536 571 1362 489 21084 8403 4313 516 1439 517 574 515 1442 515 1441 518 573 516 574 567 1397 514 1440 515 573 516 575 516 1443 515 1439 518 574 516 1440 517 608 535 1396 517 1441 517 579 515 1438 515 576 517 578 568 1390 569 1391 516 575 518 1439 516 573 517 1445 566 1391 516 571 517 572 516 1441 514 543 487
#
# Model: Samsung DB93
#
name: Off
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 667 17837 3089 8903 555 445 578 1411 583 442 554 442 529 468 528 468 554 443 554 442 554 444 552 1441 552 472 523 475 522 1473 522 1473 522 475 547 1447 548 1446 548 1446 548 1446 548 1446 548 449 548 450 547 451 546 474 523 476 521 476 521 476 522 476 521 475 546 451 547 450 548 449 548 449 548 449 548 449 548 449 548 449 548 450 547 450 547 451 546 474 523 474 523 476 521 477 520 477 520 477 521 476 521 476 546 450 547 450 547 450 546 450 547 451 546 451 546 1448 546 1472 522 2982 3005 8963 522 1499 495 502 495 502 495 502 496 501 496 501 521 476 522 475 522 475 522 1472 522 475 522 475 522 1473 521 475 522 1473 522 1499 495 1500 494 1500 496 1499 521 1473 522 475 522 475 522 475 522 475 522 475 522 475 522 476 521 475 522 476 521 476 521 476 521 502 495 503 494 503 495 502 495 501 496 501 521 476 522 476 521 476 521 476 521 476 521 476 521 476 521 476 521 476 521 476 521 476 521 503 494 503 494 503 493 504 494 502 495 502 495 502 520 477 520 2984 3003 8966 519 1475 520 477 520 477 520 477 520 478 519 477 520 478 519 479 518 504 493 1502 493 504 493 503 494 503 494 1501 519 1476 518 1475 519 478 519 1476 518 1476 519 1477 517 1501 493 1503 491 1503 493 1502 493 1502 518 479 518 479 518 479 518 1476 518 1477 517 1477 517 504 493 504 493 504 493 531 466 507 490 1529 467 506 491 529 468 1527 492 1502 492 505 493 1502 492 1502 492 505 492 504 493 504 492 505 492 506 491 532 465 532 465 531 467 530 467 530 467 1528 467 1527 492
#
name: Dh
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 667 17829 3090 8902 556 444 579 1410 584 441 529 468 529 468 554 443 554 442 555 443 553 444 551 1442 551 474 522 475 522 1473 522 475 522 475 547 1448 547 1447 547 1447 547 1447 548 1447 547 449 548 450 547 474 523 474 523 476 521 476 521 476 521 477 521 475 522 476 546 450 547 449 548 449 548 450 547 449 548 450 547 450 547 450 547 451 546 474 523 474 523 474 523 479 518 479 518 479 518 501 496 501 496 477 545 475 522 452 545 474 523 474 523 1472 522 1472 522 1472 522 1472 523 2981 3005 8990 494 1499 495 502 496 501 496 501 496 501 522 475 522 475 522 475 522 475 522 1473 521 475 522 475 522 1473 521 475 522 1473 521 1500 494 1500 495 1499 520 1474 522 1473 522 475 522 475 522 476 521 475 522 476 521 476 521 476 521 476 521 476 521 477 520 503 494 503 494 503 495 502 495 502 520 477 521 476 521 476 521 476 521 476 521 476 521 476 521 476 521 476 521 476 521 476 521 477 520 504 493 503 494 503 494 503 495 502 495 502 495 502 520 477 520 477 520 2984 3003 8966 519 1475 519 477 520 478 519 478 519 478 519 479 518 503 494 505 492 505 492 1503 493 504 493 504 493 504 518 1477 518 1476 518 1476 518 479 518 1477 517 1477 517 1501 493 1504 490 1528 468 1527 468 1527 493 1501 493 504 493 504 493 504 493 1501 493 1502 492 1502 492 504 493 505 491 532 440 556 466 531 467 530 468 530 467 530 467 1527 492 1503 491 505 492 504 493 504 493 505 491 1503 492 505 467 530 492 506 466 557 464 533 464 532 466 1528 467 1528 467 1528 466 1528 491
#
name: Cool_hi
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 667 17831 3089 8903 581 420 578 1411 583 442 529 468 528 468 554 443 554 442 554 443 553 445 551 1443 550 475 521 475 522 1473 522 475 547 449 548 1447 548 1446 548 1446 548 1446 548 1446 548 449 548 449 548 450 547 473 524 476 521 475 522 476 520 476 522 475 522 475 547 449 549 449 548 449 548 449 548 449 548 449 548 449 548 449 548 449 548 450 547 474 523 474 523 476 521 476 521 476 520 477 521 476 546 451 547 450 547 450 547 449 548 450 547 1447 547 1448 546 1448 546 1472 523 2957 3029 8967 518 1477 517 502 495 501 496 501 521 475 522 475 522 475 522 475 522 475 522 1472 522 474 523 475 522 1473 521 475 522 1472 522 1499 495 1500 495 1499 520 1474 522 1473 521 475 522 475 522 475 522 475 522 475 522 475 522 475 522 475 522 476 521 502 495 502 495 503 494 502 496 501 496 501 521 476 522 476 521 475 522 475 522 476 521 476 521 476 521 476 521 476 521 476 521 476 521 476 521 503 494 503 494 503 494 503 495 502 495 502 520 477 520 476 521 476 521 2984 3003 8965 520 1474 521 477 520 477 520 477 520 477 520 477 520 478 519 504 493 504 493 1502 494 503 494 502 495 1500 520 1475 519 1475 519 1475 519 478 519 1475 519 1476 518 1501 493 1502 492 1503 493 1501 494 1501 518 1476 518 478 519 478 519 478 519 1476 518 1476 518 1477 517 504 493 506 491 506 491 506 491 506 492 505 492 504 493 504 518 481 516 1501 493 504 493 504 493 480 517 1501 493 504 493 504 493 504 493 505 491 532 466 531 466 532 466 1528 467 1527 468 1527 492 1502 492
#
name: Cool_lo
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 667 17832 3088 8903 575 448 555 1411 583 441 529 468 529 468 554 443 554 442 554 443 553 444 551 1443 550 474 522 475 522 1473 522 475 522 475 547 1447 548 1446 548 1446 548 1446 548 1447 547 449 548 449 548 474 523 474 523 476 521 476 521 476 521 477 521 475 522 475 547 450 548 449 548 450 547 449 548 449 548 450 547 450 547 449 547 451 546 452 545 474 523 474 523 477 520 478 519 477 519 478 520 477 545 452 545 451 547 451 546 474 523 474 523 1450 544 1472 522 1472 522 1472 523 2981 3005 8990 494 1499 495 502 496 501 496 501 521 476 521 475 522 475 522 475 522 475 522 1473 521 475 522 475 522 1473 521 476 521 1473 521 1500 494 1500 495 1499 495 1499 521 1473 522 475 522 475 522 476 521 475 522 476 521 476 521 476 521 476 521 476 521 477 520 503 494 503 494 503 495 502 495 502 520 477 520 476 521 476 521 476 521 476 521 476 521 476 521 476 521 476 521 476 521 477 520 477 520 478 519 503 493 504 493 504 494 503 494 502 519 478 520 477 520 477 520 2984 3003 8966 519 1475 519 477 520 477 520 478 519 478 519 478 519 503 494 504 493 505 492 1503 493 504 493 504 493 503 519 478 519 1476 518 1476 518 478 519 1476 518 1477 517 1501 493 1504 490 1504 490 1503 493 1502 493 1502 517 480 517 504 493 480 517 1477 517 1502 492 1502 492 504 493 504 493 504 493 531 466 531 466 1529 467 1527 467 1527 492 504 493 1502 492 505 492 504 493 505 492 1503 492 505 492 505 492 505 467 557 464 532 441 556 466 532 466 1528 466 1528 491 1503 491 1503 466
#
name: Heat_hi
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 665 17827 3090 8902 556 444 579 1412 583 441 530 467 529 468 554 442 555 442 554 442 554 444 551 1443 550 473 523 475 522 1472 521 475 523 474 523 1471 549 1446 548 1445 549 1446 548 1445 549 448 549 448 549 449 548 473 523 473 524 475 522 475 522 475 523 475 522 474 548 449 548 449 549 448 549 448 549 448 549 448 549 448 549 449 548 449 548 449 548 450 547 473 524 474 523 476 521 476 521 476 521 476 522 475 547 450 547 450 548 449 548 449 548 1447 547 1447 547 1447 547 1448 546 2957 3030 8962 522 1475 519 501 496 501 497 478 519 500 522 475 522 475 523 474 523 474 523 1472 522 474 523 474 523 1472 522 475 522 1472 522 1499 495 1499 496 1499 496 1498 522 1473 522 474 522 475 522 475 522 474 523 475 522 475 522 475 522 475 522 475 522 475 522 502 495 502 495 502 495 501 496 501 496 501 521 476 522 475 522 475 522 475 522 475 522 475 522 475 522 475 522 475 522 475 522 476 521 476 521 502 495 502 495 502 495 503 495 502 495 501 521 476 521 476 521 2983 3004 8964 521 1474 520 476 521 476 521 477 520 476 521 477 520 477 520 503 494 503 494 1501 494 502 495 502 495 502 520 477 521 1474 520 1474 520 477 520 1474 520 1475 519 1475 519 1500 494 1502 492 1502 493 1501 494 1500 519 478 519 477 520 477 520 1475 519 1475 519 1475 519 478 519 478 519 503 494 505 492 505 492 505 492 1503 493 1502 493 1502 517 1476 518 479 518 479 518 479 518 480 517 479 518 1501 493 504 493 504 493 530 467 531 466 531 467 1527 468 1527 491 1502 493 1501 493
#
name: Heat_lo
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 668 17822 3064 8902 582 442 555 1413 581 442 528 468 529 494 528 469 502 495 527 470 526 471 525 1468 552 446 550 448 549 1446 548 448 549 448 549 1446 548 1448 546 1471 523 1473 521 1473 521 476 521 475 522 475 547 449 548 449 548 449 548 449 548 449 548 449 548 449 548 449 548 450 547 474 523 474 523 474 523 477 520 477 520 477 520 477 521 476 521 476 546 450 548 450 547 474 523 474 523 450 547 474 523 474 523 452 545 474 523 474 523 474 523 1500 494 1499 495 1499 496 1498 522 2955 3032 8963 521 1472 522 475 522 474 523 475 522 475 522 475 522 475 522 475 522 475 522 1499 495 502 495 502 495 1499 496 501 521 1473 522 1473 522 1472 522 1472 522 1473 521 1473 522 475 522 475 522 502 495 502 495 502 495 503 495 501 496 501 496 501 521 476 521 476 521 476 521 476 521 476 521 476 521 476 521 476 521 476 521 476 521 477 520 504 493 503 494 503 494 503 495 502 495 502 495 502 520 477 521 476 521 476 521 476 521 477 520 477 520 477 520 476 521 477 520 2984 3003 8967 518 1502 492 504 493 504 494 503 494 503 494 503 519 478 519 478 519 478 519 1476 518 478 518 479 518 478 519 478 519 1501 493 1501 493 506 491 1504 491 1527 468 1503 492 1526 493 1501 493 1501 494 1501 493 1501 493 504 493 504 493 504 493 1528 466 1529 466 1528 467 529 468 529 493 504 493 504 493 504 493 1502 492 1502 492 1502 467 529 493 1502 491 533 465 532 465 532 465 531 467 530 467 1528 467 530 467 530 467 530 467 530 467 530 467 1527 467 1528 466 1528 466 1529 492
#
# Model: Samsung AR-EH04
#
name: Off
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 663 17769 3057 8901 529 492 527 1434 556 465 529 464 529 464 555 439 555 438 556 438 554 440 553 1435 552 444 549 470 524 1465 524 1466 522 473 522 1467 522 1466 549 1440 549 1440 548 1440 548 445 549 445 549 446 548 447 547 471 523 470 524 471 523 472 522 472 521 473 522 472 522 472 523 472 548 446 549 445 548 446 548 447 547 447 547 446 548 447 547 470 524 471 523 471 523 471 523 471 523 498 496 475 519 498 496 497 498 497 522 472 523 471 524 470 523 471 523 1443 546 1442 547 2947 3023 8935 522 1466 522 471 523 472 522 474 520 498 496 498 496 498 497 497 497 497 523 1466 523 471 523 471 523 1466 523 471 523 1466 522 1467 522 1467 522 1493 495 1493 496 1493 497 497 522 472 523 471 523 471 522 472 522 472 522 472 522 472 522 472 522 472 522 472 522 472 522 472 522 499 495 499 495 499 495 499 495 499 496 498 522 472 523 472 523 471 522 472 522 472 522 472 522 472 522 473 521 473 521 473 521 473 521 473 521 499 495 500 494 499 495 499 496 499 521 2947 3024 8937 521 1467 521 473 521 473 521 472 521 473 521 473 521 473 521 473 521 474 520 1469 520 500 494 500 494 1495 495 500 495 499 520 474 521 1468 520 1468 521 1468 521 1468 521 1468 521 1469 519 1470 518 1495 493 1496 493 500 495 499 520 474 521 1468 520 1469 520 1469 520 473 521 474 520 474 520 475 519 476 518 500 494 502 492 502 491 1497 493 1495 495 499 495 499 520 474 520 475 519 475 519 475 519 475 519 475 519 500 494 501 493 501 493 501 493 501 493 1498 491 1497 519
#
name: Dh
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 665 17760 3083 8875 553 468 527 1432 584 438 555 439 529 464 555 439 555 438 556 438 555 439 553 1435 552 443 550 470 524 1466 523 471 522 473 521 1467 523 1466 549 1439 549 1440 549 1439 549 445 549 445 549 445 549 446 548 470 524 470 524 471 523 472 522 472 522 473 521 472 522 472 547 447 548 445 549 445 549 445 549 445 549 446 548 445 549 445 549 447 547 470 524 471 523 471 523 471 523 473 521 473 521 473 521 473 521 472 523 472 548 446 548 1441 547 1441 548 1441 547 1441 547 2947 3023 8935 522 1466 522 472 522 474 519 475 519 475 519 474 521 473 546 448 547 448 546 1465 523 449 545 448 546 1466 522 471 523 1467 522 1466 522 1493 495 1493 495 1493 496 1493 522 471 523 471 523 471 523 471 523 471 523 471 523 471 523 472 522 472 522 472 522 472 522 472 522 499 495 498 495 499 496 498 496 498 496 498 522 472 523 471 522 472 522 472 522 472 522 472 522 472 522 472 522 472 522 472 522 473 521 473 521 499 495 500 494 500 495 499 495 499 495 498 522 2947 3023 8937 520 1467 521 473 521 473 521 473 521 473 521 473 521 473 521 474 520 474 520 1495 494 500 494 500 495 500 494 1494 520 1468 521 1467 521 473 521 1468 521 1468 520 1469 519 1469 519 1471 517 1495 494 1495 494 1494 520 474 521 473 521 473 520 1468 521 1468 521 1468 520 474 520 475 519 475 519 500 493 500 494 501 493 501 493 501 493 1495 495 1494 520 474 520 474 520 474 520 475 519 1470 518 475 519 476 518 500 493 501 493 501 493 501 493 1497 492 1497 492 1496 493 1495 518
#
name: Cool_hi
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 666 17765 3056 8901 529 492 526 1434 556 465 529 464 530 464 555 438 556 438 555 439 554 440 552 1436 551 443 550 470 524 1465 524 471 523 472 522 1467 521 1467 548 1441 549 1440 548 1440 548 445 549 445 549 445 549 446 548 447 547 470 524 471 523 471 523 473 521 472 522 473 521 473 521 473 522 472 548 446 549 446 548 446 548 447 547 447 547 470 524 447 547 471 523 471 523 471 523 471 523 471 523 475 519 498 496 498 496 498 496 497 498 497 523 1466 524 1443 545 1441 548 1442 546 2947 3023 8935 522 1466 522 472 522 472 522 498 496 498 496 498 496 498 496 498 522 472 523 1466 522 471 523 471 523 1466 523 471 523 1466 523 1467 522 1467 521 1493 496 1493 495 1493 497 497 522 472 523 471 523 471 523 472 522 472 522 472 522 472 522 472 522 472 522 472 522 472 522 473 521 499 495 499 495 499 495 499 496 498 496 498 522 472 522 472 523 472 521 472 522 472 522 472 522 472 522 473 521 473 521 473 521 473 521 474 520 500 494 500 494 500 495 500 495 499 521 2947 3024 8937 520 1467 521 473 521 473 521 473 521 473 521 473 521 473 521 474 520 474 520 1469 520 500 494 500 493 1496 494 1494 495 1494 520 1468 520 473 521 1469 519 1468 521 1469 519 1470 519 1470 519 1495 493 1496 493 1495 495 499 520 474 520 474 520 1469 520 1469 519 1469 519 474 520 475 519 500 494 500 494 500 494 502 492 502 492 502 493 501 493 1496 494 500 519 475 520 475 518 1470 519 475 518 476 518 475 519 476 494 525 493 501 493 501 493 1498 491 1498 491 1497 493 1496 518
#
name: Cool_lo
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 664 17763 3082 8874 553 444 552 1433 583 438 529 464 530 464 555 439 555 438 556 438 555 440 553 1435 552 443 550 470 524 1466 523 472 521 472 522 1467 523 1466 549 1439 549 1439 549 1439 550 444 550 445 549 445 549 447 547 470 524 471 523 471 523 472 522 472 522 473 521 472 523 472 522 471 549 446 549 445 549 446 548 446 548 446 548 446 548 446 548 448 546 471 523 471 523 471 523 471 523 475 519 497 497 474 520 475 520 497 497 496 524 471 524 1465 523 1442 547 1442 547 1442 547 2946 3024 8935 522 1466 522 471 523 474 520 474 520 498 496 474 521 497 522 471 523 471 523 1465 523 471 523 471 523 1466 522 471 523 1466 523 1466 523 1493 495 1493 495 1493 496 1492 523 471 523 471 523 471 523 471 523 471 523 471 523 471 523 472 522 472 522 472 522 472 522 473 521 499 495 499 495 499 496 498 497 498 497 497 523 472 522 471 522 472 522 472 522 472 522 472 522 472 522 472 522 472 522 473 521 473 521 473 521 499 495 499 495 499 496 499 496 498 496 498 522 2946 3024 8937 521 1467 521 472 522 472 522 473 521 473 521 473 521 473 521 474 520 474 520 1495 493 500 494 499 495 499 495 499 496 1493 521 1468 520 473 521 1468 520 1468 521 1468 520 1469 519 1470 518 1495 494 1495 494 1494 495 499 520 473 521 473 521 1468 520 1469 520 1468 521 474 520 474 520 475 519 475 519 476 518 1496 492 1496 494 1495 495 499 520 1469 520 474 520 474 520 474 519 1470 520 474 520 476 518 476 519 477 517 500 494 500 494 503 491 1497 492 1496 493 1495 519 1470 519
#
name: Heat_hi
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 666 17758 3056 8901 528 493 526 1434 580 441 554 439 529 465 554 439 555 439 555 439 554 440 553 1435 552 443 549 470 524 1465 524 472 522 472 521 1467 523 1467 548 1440 549 1440 548 1440 549 445 549 445 549 446 548 446 548 471 523 471 523 471 523 471 523 473 521 473 521 473 521 473 522 472 547 446 549 446 549 445 548 446 548 446 548 446 548 446 548 447 547 471 523 471 523 471 523 471 523 473 521 474 520 473 521 474 521 473 522 473 546 447 548 1441 548 1442 547 1442 547 1442 546 2948 3021 8936 521 1466 522 472 522 498 496 499 494 476 519 476 519 497 497 497 523 472 522 1466 523 471 523 472 522 1466 522 472 522 1466 522 1467 522 1467 522 1493 494 1495 495 1493 522 472 522 472 522 471 522 472 522 472 522 472 522 472 522 472 522 472 522 472 522 472 522 473 521 473 521 499 495 499 495 499 495 499 496 498 521 473 522 472 523 472 522 472 522 472 522 473 521 472 522 472 522 472 522 473 521 473 521 474 520 473 521 499 495 500 494 500 495 499 495 499 521 2947 3023 8938 520 1468 520 473 521 473 521 473 521 473 521 473 521 473 521 474 520 474 520 1495 494 500 494 500 494 500 495 500 494 1494 520 1468 521 474 520 1468 520 1469 520 1468 520 1469 520 1470 518 1496 493 1496 493 1495 495 499 519 475 520 474 520 1468 520 1469 519 1469 519 474 520 475 519 475 519 476 518 500 494 500 494 1497 492 1497 492 1496 493 1495 519 475 519 475 519 475 519 475 519 475 519 1471 518 476 518 500 494 501 493 501 493 501 493 1498 491 1498 491 1496 518 1472 517
#
name: Heat_lo
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 664 17757 3057 8901 528 469 550 1434 556 465 553 440 529 465 554 439 555 439 555 438 555 440 553 1435 552 443 550 470 524 1466 522 472 522 472 521 1467 523 1466 549 1440 549 1440 548 1440 548 445 549 445 549 445 549 446 548 470 524 471 523 471 523 471 523 472 522 472 522 473 522 472 523 472 548 446 549 445 550 445 548 446 548 446 548 446 548 446 548 447 547 470 524 471 523 471 523 471 523 471 523 474 519 474 521 474 521 473 522 473 546 447 547 1441 548 1442 546 1442 547 1442 546 2947 3023 8935 522 1466 522 472 522 498 496 498 495 499 496 498 496 498 521 473 522 471 523 1466 522 471 523 471 522 1466 523 471 523 1467 522 1467 522 1467 521 1493 495 1494 496 1493 521 473 522 472 522 471 523 472 522 471 523 472 522 472 522 472 522 472 522 472 522 472 522 472 522 473 521 499 495 499 495 499 495 499 496 498 522 473 522 472 523 471 522 472 522 472 522 472 522 472 522 472 522 472 522 473 521 473 521 473 521 473 521 499 495 500 494 500 495 499 496 498 522 2947 3023 8937 521 1468 520 473 521 473 521 473 521 473 521 473 521 473 521 474 520 474 520 1470 518 500 494 500 494 500 494 500 494 1494 521 1468 521 473 521 1468 520 1468 520 1469 520 1469 520 1470 518 1495 493 1496 493 1495 494 500 519 475 520 474 520 1469 519 1469 520 1469 519 474 520 474 520 475 519 477 517 500 494 1496 493 1496 493 1496 493 500 495 1495 519 475 518 475 519 475 518 476 518 475 519 1470 519 500 494 500 494 501 493 501 493 501 493 1499 490 1497 493 1497 492 1496 518
@@ -4,9 +4,8 @@ void infrared_scene_edit_delete_done_on_enter(void* context) {
InfraredApp* infrared = context;
Popup* popup = infrared->popup;
popup_set_icon(popup, 0, 2, &I_DolphinMafia_115x62);
popup_set_header(popup, "Deleted", 83, 19, AlignLeft, AlignBottom);
popup_set_icon(popup, 0, 2, &I_DolphinMafia_119x62);
popup_set_header(popup, "Deleted", 80, 19, AlignLeft, AlignBottom);
popup_set_callback(popup, infrared_popup_closed_callback);
popup_set_context(popup, context);
popup_set_timeout(popup, 1500);
@@ -4,9 +4,8 @@ void infrared_scene_edit_rename_done_on_enter(void* context) {
InfraredApp* infrared = context;
Popup* popup = infrared->popup;
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
popup_set_header(popup, "Saved!", 5, 7, AlignLeft, AlignTop);
popup_set_icon(popup, 36, 5, &I_DolphinSaved_92x58);
popup_set_header(popup, "Saved", 15, 19, AlignLeft, AlignBottom);
popup_set_callback(popup, infrared_popup_closed_callback);
popup_set_context(popup, context);
popup_set_timeout(popup, 1500);
@@ -4,12 +4,12 @@ void infrared_scene_learn_done_on_enter(void* context) {
InfraredApp* infrared = context;
Popup* popup = infrared->popup;
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
if(infrared->app_state.is_learning_new_remote) {
popup_set_icon(popup, 48, 6, &I_DolphinDone_80x58);
popup_set_header(popup, "New remote\ncreated!", 0, 0, AlignLeft, AlignTop);
} else {
popup_set_header(popup, "Saved!", 5, 7, AlignLeft, AlignTop);
popup_set_icon(popup, 36, 5, &I_DolphinSaved_92x58);
popup_set_header(popup, "Saved", 15, 19, AlignLeft, AlignBottom);
}
popup_set_callback(popup, infrared_popup_closed_callback);
@@ -4,8 +4,8 @@ void lfrfid_scene_delete_success_on_enter(void* context) {
LfRfid* app = context;
Popup* popup = app->popup;
popup_set_icon(popup, 0, 2, &I_DolphinMafia_115x62);
popup_set_header(popup, "Deleted", 83, 19, AlignLeft, AlignBottom);
popup_set_icon(popup, 0, 2, &I_DolphinMafia_119x62);
popup_set_header(popup, "Deleted", 80, 19, AlignLeft, AlignBottom);
popup_set_context(popup, app);
popup_set_callback(popup, lfrfid_popup_timeout_callback);
popup_set_timeout(popup, 1500);
@@ -7,8 +7,8 @@ void lfrfid_scene_save_success_on_enter(void* context) {
// Clear state of data enter scene
scene_manager_set_scene_state(app->scene_manager, LfRfidSceneSaveData, 0);
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
popup_set_header(popup, "Saved!", 5, 7, AlignLeft, AlignTop);
popup_set_icon(popup, 36, 5, &I_DolphinSaved_92x58);
popup_set_header(popup, "Saved", 15, 19, AlignLeft, AlignBottom);
popup_set_context(popup, app);
popup_set_callback(popup, lfrfid_popup_timeout_callback);
popup_set_timeout(popup, 1500);
@@ -57,7 +57,7 @@ bool lfrfid_scene_write_on_event(void* context, SceneManagerEvent event) {
scene_manager_next_scene(app->scene_manager, LfRfidSceneWriteSuccess);
consumed = true;
} else if(event.event == LfRfidEventWriteProtocolCannotBeWritten) {
popup_set_icon(popup, 72, 17, &I_DolphinCommon_56x48);
popup_set_icon(popup, 83, 22, &I_WarningDolphinFlip_45x42);
popup_set_header(popup, "Error", 64, 3, AlignCenter, AlignTop);
popup_set_text(popup, "This protocol\ncannot be written", 3, 17, AlignLeft, AlignTop);
notification_message(app->notifications, &sequence_blink_start_red);
@@ -65,7 +65,7 @@ bool lfrfid_scene_write_on_event(void* context, SceneManagerEvent event) {
} else if(
(event.event == LfRfidEventWriteFobCannotBeWritten) ||
(event.event == LfRfidEventWriteTooLongToWrite)) {
popup_set_icon(popup, 72, 17, &I_DolphinCommon_56x48);
popup_set_icon(popup, 83, 22, &I_WarningDolphinFlip_45x42);
popup_set_header(popup, "Still trying to write...", 64, 3, AlignCenter, AlignTop);
popup_set_text(
popup,
@@ -4,8 +4,8 @@ void lfrfid_scene_write_success_on_enter(void* context) {
LfRfid* app = context;
Popup* popup = app->popup;
popup_set_header(popup, "Successfully\nwritten!", 94, 3, AlignCenter, AlignTop);
popup_set_icon(popup, 0, 6, &I_RFIDDolphinSuccess_108x57);
popup_set_header(popup, "Success!", 75, 10, AlignLeft, AlignTop);
popup_set_icon(popup, 0, 9, &I_DolphinSuccess_91x55);
popup_set_context(popup, app);
popup_set_callback(popup, lfrfid_popup_timeout_callback);
popup_set_timeout(popup, 1500);
+18
View File
@@ -65,6 +65,15 @@ App(
sources=["plugins/supported_cards/troika.c"],
)
App(
appid="washcity_parser",
apptype=FlipperAppType.PLUGIN,
entry_point="washcity_plugin_ep",
targets=["f7"],
requires=["nfc"],
sources=["plugins/supported_cards/washcity.c"],
)
App(
appid="plantain_parser",
apptype=FlipperAppType.PLUGIN,
@@ -101,6 +110,15 @@ App(
sources=["plugins/supported_cards/umarsh.c"],
)
App(
appid="hid_parser",
apptype=FlipperAppType.PLUGIN,
entry_point="hid_plugin_ep",
targets=["f7"],
requires=["nfc"],
sources=["plugins/supported_cards/hid.c"],
)
App(
appid="nfc_start",
targets=["f7"],
@@ -52,9 +52,15 @@ static NfcCommand
if(mf_ultralight_event->type == MfUltralightPollerEventTypeReadSuccess) {
nfc_device_set_data(
instance->nfc_device, NfcProtocolMfUltralight, nfc_poller_get_data(instance->poller));
view_dispatcher_send_custom_event(instance->view_dispatcher, NfcCustomEventPollerSuccess);
const MfUltralightData* data =
nfc_device_get_data(instance->nfc_device, NfcProtocolMfUltralight);
uint32_t event = (data->pages_read == data->pages_total) ? NfcCustomEventPollerSuccess :
NfcCustomEventPollerIncomplete;
view_dispatcher_send_custom_event(instance->view_dispatcher, event);
return NfcCommandStop;
} else if(mf_ultralight_event->type == MfUltralightPollerEventTypeAuthRequest) {
view_dispatcher_send_custom_event(instance->view_dispatcher, NfcCustomEventCardDetected);
nfc_device_set_data(
instance->nfc_device, NfcProtocolMfUltralight, nfc_poller_get_data(instance->poller));
const MfUltralightData* data =
@@ -90,10 +96,55 @@ static NfcCommand
return NfcCommandContinue;
}
enum {
NfcSceneMfUltralightReadMenuStateCardSearch,
NfcSceneMfUltralightReadMenuStateCardFound,
};
static void nfc_scene_read_setup_view(NfcApp* instance) {
Popup* popup = instance->popup;
popup_reset(popup);
uint32_t state = scene_manager_get_scene_state(instance->scene_manager, NfcSceneRead);
if(state == NfcSceneMfUltralightReadMenuStateCardSearch) {
popup_set_icon(instance->popup, 0, 8, &I_NFC_manual_60x50);
popup_set_header(instance->popup, "Unlocking", 97, 15, AlignCenter, AlignTop);
popup_set_text(
instance->popup, "Apply card to\nFlipper's back", 97, 27, AlignCenter, AlignTop);
} else {
popup_set_header(instance->popup, "Don't move", 85, 27, AlignCenter, AlignTop);
popup_set_icon(instance->popup, 12, 20, &A_Loading_24);
}
view_dispatcher_switch_to_view(instance->view_dispatcher, NfcViewPopup);
}
static void nfc_scene_read_on_enter_mf_ultralight(NfcApp* instance) {
bool unlocking =
scene_manager_has_previous_scene(instance->scene_manager, NfcSceneMfUltralightUnlockWarn);
uint32_t state = unlocking ? NfcSceneMfUltralightReadMenuStateCardSearch :
NfcSceneMfUltralightReadMenuStateCardFound;
scene_manager_set_scene_state(instance->scene_manager, NfcSceneRead, state);
nfc_scene_read_setup_view(instance);
nfc_poller_start(instance->poller, nfc_scene_read_poller_callback_mf_ultralight, instance);
}
bool nfc_scene_read_on_event_mf_ultralight(NfcApp* instance, uint32_t event) {
if(event == NfcCustomEventCardDetected) {
scene_manager_set_scene_state(
instance->scene_manager, NfcSceneRead, NfcSceneMfUltralightReadMenuStateCardFound);
nfc_scene_read_setup_view(instance);
} else if((event == NfcCustomEventPollerIncomplete)) {
notification_message(instance->notifications, &sequence_semi_success);
scene_manager_next_scene(instance->scene_manager, NfcSceneReadSuccess);
dolphin_deed(DolphinDeedNfcReadSuccess);
}
return true;
}
static void nfc_scene_read_and_saved_menu_on_enter_mf_ultralight(NfcApp* instance) {
Submenu* submenu = instance->submenu;
@@ -179,7 +230,7 @@ const NfcProtocolSupportBase nfc_protocol_support_mf_ultralight = {
.scene_read =
{
.on_enter = nfc_scene_read_on_enter_mf_ultralight,
.on_event = nfc_protocol_support_common_on_event_empty,
.on_event = nfc_scene_read_on_event_mf_ultralight,
},
.scene_read_menu =
{
@@ -146,8 +146,7 @@ static void nfc_protocol_support_scene_more_info_on_exit(NfcApp* instance) {
// SceneRead
static void nfc_protocol_support_scene_read_on_enter(NfcApp* instance) {
popup_set_header(
instance->popup, "Reading card\nDon't move...", 85, 24, AlignCenter, AlignTop);
popup_set_header(instance->popup, "Don't move", 85, 27, AlignCenter, AlignTop);
popup_set_icon(instance->popup, 12, 23, &A_Loading_24);
view_dispatcher_switch_to_view(instance->view_dispatcher, NfcViewPopup);
@@ -162,7 +161,7 @@ static void nfc_protocol_support_scene_read_on_enter(NfcApp* instance) {
// Start poller with the appropriate callback
nfc_protocol_support[protocol]->scene_read.on_enter(instance);
nfc_blink_detect_start(instance);
nfc_blink_read_start(instance);
}
static bool nfc_protocol_support_scene_read_on_event(NfcApp* instance, SceneManagerEvent event) {
@@ -200,6 +199,10 @@ static bool nfc_protocol_support_scene_read_on_event(NfcApp* instance, SceneMana
instance->scene_manager, NfcSceneDetect);
}
consumed = true;
} else if(event.event == NfcCustomEventCardDetected) {
const NfcProtocol protocol =
instance->protocols_detected[instance->protocols_detected_selected_idx];
consumed = nfc_protocol_support[protocol]->scene_read.on_event(instance, event.event);
}
} else if(event.type == SceneManagerEventTypeBack) {
nfc_poller_stop(instance->poller);
+2 -2
View File
@@ -223,7 +223,7 @@ void nfc_text_store_clear(NfcApp* nfc) {
}
void nfc_blink_read_start(NfcApp* nfc) {
notification_message(nfc->notifications, &sequence_blink_start_cyan);
notification_message(nfc->notifications, &sequence_blink_start_yellow);
}
void nfc_blink_emulate_start(NfcApp* nfc) {
@@ -231,7 +231,7 @@ void nfc_blink_emulate_start(NfcApp* nfc) {
}
void nfc_blink_detect_start(NfcApp* nfc) {
notification_message(nfc->notifications, &sequence_blink_start_yellow);
notification_message(nfc->notifications, &sequence_blink_start_cyan);
}
void nfc_blink_stop(NfcApp* nfc) {
@@ -0,0 +1,153 @@
#include "nfc_supported_card_plugin.h"
#include <flipper_application/flipper_application.h>
#include <nfc/nfc_device.h>
#include <nfc/helpers/nfc_util.h>
#include <nfc/protocols/mf_classic/mf_classic_poller_sync.h>
#define TAG "HID"
static const uint64_t hid_key = 0x484944204953;
bool hid_verify(Nfc* nfc) {
bool verified = false;
do {
const uint8_t verify_sector = 1;
uint8_t block_num = mf_classic_get_first_block_num_of_sector(verify_sector);
FURI_LOG_D(TAG, "Verifying sector %u", verify_sector);
MfClassicKey key = {};
nfc_util_num2bytes(hid_key, COUNT_OF(key.data), key.data);
MfClassicAuthContext auth_ctx = {};
MfClassicError error =
mf_classic_poller_sync_auth(nfc, block_num, &key, MfClassicKeyTypeA, &auth_ctx);
if(error != MfClassicErrorNone) {
FURI_LOG_D(TAG, "Failed to read block %u: %d", block_num, error);
break;
}
verified = true;
} while(false);
return verified;
}
static bool hid_read(Nfc* nfc, NfcDevice* device) {
furi_assert(nfc);
furi_assert(device);
bool is_read = false;
MfClassicData* data = mf_classic_alloc();
nfc_device_copy_data(device, NfcProtocolMfClassic, data);
do {
MfClassicType type = MfClassicType1k;
MfClassicError error = mf_classic_poller_sync_detect_type(nfc, &type);
if(error != MfClassicErrorNone) break;
data->type = type;
MfClassicDeviceKeys keys = {};
for(size_t i = 0; i < mf_classic_get_total_sectors_num(data->type); i++) {
nfc_util_num2bytes(hid_key, sizeof(MfClassicKey), keys.key_a[i].data);
FURI_BIT_SET(keys.key_a_mask, i);
nfc_util_num2bytes(hid_key, sizeof(MfClassicKey), keys.key_b[i].data);
FURI_BIT_SET(keys.key_b_mask, i);
}
error = mf_classic_poller_sync_read(nfc, &keys, data);
if(error != MfClassicErrorNone) {
FURI_LOG_W(TAG, "Failed to read data");
break;
}
nfc_device_set_data(device, NfcProtocolMfClassic, data);
is_read = true;
} while(false);
mf_classic_free(data);
return is_read;
}
static uint8_t get_bit_length(const uint8_t* half_block) {
uint8_t bitLength = 0;
uint32_t* halves = (uint32_t*)half_block;
if(halves[0] == 0) {
uint8_t leading0s = __builtin_clz(REVERSE_BYTES_U32(halves[1]));
bitLength = 31 - leading0s;
} else {
uint8_t leading0s = __builtin_clz(REVERSE_BYTES_U32(halves[0]));
bitLength = 63 - leading0s;
}
return bitLength;
}
static uint64_t get_pacs_bits(const uint8_t* block, uint8_t bitLength) {
// Remove sentinel bit from credential. Byteswapping to handle array of bytes vs 64bit value
uint64_t sentinel = __builtin_bswap64(1ULL << bitLength);
uint64_t swapped = 0;
memcpy(&swapped, block, sizeof(uint64_t));
swapped = __builtin_bswap64(swapped ^ sentinel);
FURI_LOG_D(TAG, "PACS: (%d) %016llx", bitLength, swapped);
return swapped;
}
static bool hid_parse(const NfcDevice* device, FuriString* parsed_data) {
furi_assert(device);
const MfClassicData* data = nfc_device_get_data(device, NfcProtocolMfClassic);
bool parsed = false;
do {
// verify key
const uint8_t verify_sector = 1;
MfClassicSectorTrailer* sec_tr =
mf_classic_get_sector_trailer_by_sector(data, verify_sector);
uint64_t key = nfc_util_bytes2num(sec_tr->key_a.data, 6);
if(key != hid_key) break;
// Currently doesn't support bit length > 63
const uint8_t* credential_block = data->block[5].data + 8;
uint8_t bitLength = get_bit_length(credential_block);
if(bitLength == 0) break;
uint64_t credential = get_pacs_bits(credential_block, bitLength);
if(credential == 0) break;
furi_string_printf(parsed_data, "\e#HID Card\n%dbit\n%llx", bitLength, credential);
parsed = true;
} while(false);
return parsed;
}
/* Actual implementation of app<>plugin interface */
static const NfcSupportedCardsPlugin hid_plugin = {
.protocol = NfcProtocolMfClassic,
.verify = hid_verify,
.read = hid_read,
.parse = hid_parse,
};
/* Plugin descriptor to comply with basic plugin specification */
static const FlipperAppPluginDescriptor hid_plugin_descriptor = {
.appid = NFC_SUPPORTED_CARD_PLUGIN_APP_ID,
.ep_api_version = NFC_SUPPORTED_CARD_PLUGIN_API_VERSION,
.entry_point = &hid_plugin,
};
/* Plugin entry point - must return a pointer to const descriptor */
const FlipperAppPluginDescriptor* hid_plugin_ep() {
return &hid_plugin_descriptor;
}
@@ -16,6 +16,35 @@ static bool mykey_has_lockid(const St25tbData* data) {
return (data->blocks[5] & 0xFF) == 0x7F;
}
static bool check_invalid_low_nibble(uint8_t value) {
uint8_t value_lo = value & 0xF;
return value_lo >= 0xA;
}
static bool mykey_get_production_date(
const St25tbData* data,
uint16_t* year_ptr,
uint8_t* month_ptr,
uint8_t* day_ptr) {
uint32_t date_block = data->blocks[8];
uint8_t year = date_block >> 16 & 0xFF;
uint8_t month = date_block >> 8 & 0xFF;
uint8_t day = date_block & 0xFF;
// dates are coded in a peculiar way, the hexadecimal value should in fact be interpreted as a decimal value
// so anything in range A-F is invalid.
if(day > 0x31 || month > 0x12 || day == 0 || month == 0 || year == 0) {
return false;
}
if(check_invalid_low_nibble(day) || check_invalid_low_nibble(month) ||
check_invalid_low_nibble(year) || check_invalid_low_nibble(year >> 4)) {
return false;
}
*year_ptr = year + 0x2000;
*month_ptr = month;
*day_ptr = day;
return true;
}
static bool mykey_parse(const NfcDevice* device, FuriString* parsed_data) {
furi_assert(device);
furi_assert(parsed_data);
@@ -34,7 +63,10 @@ static bool mykey_parse(const NfcDevice* device, FuriString* parsed_data) {
}
}
if((data->blocks[8] >> 16 & 0xFF) > 0x31 || (data->blocks[8] >> 8 & 0xFF) > 0x12) {
uint16_t mfg_year;
uint8_t mfg_month, mfg_day;
if(!mykey_get_production_date(data, &mfg_year, &mfg_month, &mfg_day)) {
FURI_LOG_D(TAG, "bad mfg date");
return false;
}
@@ -56,13 +88,8 @@ static bool mykey_parse(const NfcDevice* device, FuriString* parsed_data) {
furi_string_cat_printf(parsed_data, "Blank: %s\n", is_blank ? "yes" : "no");
furi_string_cat_printf(parsed_data, "LockID: %s\n", mykey_has_lockid(data) ? "maybe" : "no");
uint32_t block8 = data->blocks[8];
furi_string_cat_printf(
parsed_data,
"Prod. date: %02lX/%02lX/%04lX",
block8 >> 16 & 0xFF,
block8 >> 8 & 0xFF,
0x2000 + (block8 & 0xFF));
parsed_data, "Prod. date: %02X/%02X/%04X", mfg_day, mfg_month, mfg_year);
if(!is_blank) {
furi_string_cat_printf(
@@ -32,8 +32,7 @@
#include <nfc/nfc_device.h>
#include <nfc/helpers/nfc_util.h>
#include <nfc/protocols/mf_classic/mf_classic_poller_sync.h>
#include <stdbool.h>
#include <stdint.h>
#include <furi_hal_rtc.h>
#define TAG "Umarsh"
@@ -0,0 +1,193 @@
/*
* Parser for WashCity MarkItaly Card (Europe).
*
* Copyright 2023 Filipe Polido (YaBaPT) <polido@gmail.com>
*
* Based on MetroMoney by Leptoptilos <leptoptilos@icloud.com>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "nfc_supported_card_plugin.h"
#include "protocols/mf_classic/mf_classic.h"
#include <flipper_application/flipper_application.h>
#include <nfc/nfc_device.h>
#include <nfc/helpers/nfc_util.h>
#include <nfc/protocols/mf_classic/mf_classic_poller_sync.h>
#define TAG "WashCity"
typedef struct {
uint64_t a;
uint64_t b;
} MfClassicKeyPair;
static const MfClassicKeyPair washcity_1k_keys[] = {
{.a = 0xA0A1A2A3A4A5, .b = 0x010155010100}, // Sector 00
{.a = 0xC78A3D0E1BCD, .b = 0xFFFFFFFFFFFF}, // Sector 01
{.a = 0xC78A3D0E0000, .b = 0xFFFFFFFFFFFF}, // Sector 02
{.a = 0xC78A3D0E0000, .b = 0xFFFFFFFFFFFF}, // Sector 03
{.a = 0xC78A3D0E0000, .b = 0xFFFFFFFFFFFF}, // Sector 04
{.a = 0xC78A3D0E0000, .b = 0xFFFFFFFFFFFF}, // Sector 05
{.a = 0xC78A3D0E0000, .b = 0xFFFFFFFFFFFF}, // Sector 06
{.a = 0xC78A3D0E0000, .b = 0xFFFFFFFFFFFF}, // Sector 07
{.a = 0xC78A3D0E0000, .b = 0xFFFFFFFFFFFF}, // Sector 08
{.a = 0x010155010100, .b = 0xFFFFFFFFFFFF}, // Sector 09
{.a = 0x010155010100, .b = 0xFFFFFFFFFFFF}, // Sector 10
{.a = 0x010155010100, .b = 0xFFFFFFFFFFFF}, // Sector 11
{.a = 0x010155010100, .b = 0xFFFFFFFFFFFF}, // Sector 12
{.a = 0x010155010100, .b = 0xFFFFFFFFFFFF}, // Sector 13
{.a = 0x010155010100, .b = 0xFFFFFFFFFFFF}, // Sector 14
{.a = 0x010155010100, .b = 0xFFFFFFFFFFFF}, // Sector 15
};
static bool washcity_verify(Nfc* nfc) {
bool verified = false;
do {
const uint8_t ticket_sector_number = 0;
const uint8_t ticket_block_number =
mf_classic_get_first_block_num_of_sector(ticket_sector_number) + 1;
FURI_LOG_D(TAG, "Verifying sector %u", ticket_sector_number);
MfClassicKey key = {0};
nfc_util_num2bytes(washcity_1k_keys[ticket_sector_number].a, COUNT_OF(key.data), key.data);
MfClassicAuthContext auth_context;
MfClassicError error = mf_classic_poller_sync_auth(
nfc, ticket_block_number, &key, MfClassicKeyTypeA, &auth_context);
if(error != MfClassicErrorNone) {
FURI_LOG_D(TAG, "Failed to read block %u: %d", ticket_block_number, error);
break;
}
verified = true;
} while(false);
return verified;
}
static bool washcity_read(Nfc* nfc, NfcDevice* device) {
furi_assert(nfc);
furi_assert(device);
bool is_read = false;
MfClassicData* data = mf_classic_alloc();
nfc_device_copy_data(device, NfcProtocolMfClassic, data);
do {
MfClassicType type = MfClassicTypeMini;
MfClassicError error = mf_classic_poller_sync_detect_type(nfc, &type);
if(error != MfClassicErrorNone) break;
data->type = type;
if(type != MfClassicType1k) break;
MfClassicDeviceKeys keys = {
.key_a_mask = 0,
.key_b_mask = 0,
};
for(size_t i = 0; i < mf_classic_get_total_sectors_num(data->type); i++) {
nfc_util_num2bytes(washcity_1k_keys[i].a, sizeof(MfClassicKey), keys.key_a[i].data);
FURI_BIT_SET(keys.key_a_mask, i);
nfc_util_num2bytes(washcity_1k_keys[i].b, sizeof(MfClassicKey), keys.key_b[i].data);
FURI_BIT_SET(keys.key_b_mask, i);
}
error = mf_classic_poller_sync_read(nfc, &keys, data);
if(error != MfClassicErrorNone) {
FURI_LOG_W(TAG, "Failed to read data");
break;
}
nfc_device_set_data(device, NfcProtocolMfClassic, data);
is_read = true;
} while(false);
mf_classic_free(data);
return is_read;
}
static bool washcity_parse(const NfcDevice* device, FuriString* parsed_data) {
furi_assert(device);
const MfClassicData* data = nfc_device_get_data(device, NfcProtocolMfClassic);
bool parsed = false;
do {
// Verify key
const uint8_t ticket_sector_number = 1;
const uint8_t ticket_block_number = 0;
const MfClassicSectorTrailer* sec_tr =
mf_classic_get_sector_trailer_by_sector(data, ticket_sector_number);
const uint64_t key = nfc_util_bytes2num(sec_tr->key_a.data, COUNT_OF(sec_tr->key_a.data));
if(key != washcity_1k_keys[ticket_sector_number].a) break;
// Parse data
const uint8_t start_block_num =
mf_classic_get_first_block_num_of_sector(ticket_sector_number);
const uint8_t* block_start_ptr =
&data->block[start_block_num + ticket_block_number].data[0];
uint32_t balance = nfc_util_bytes2num(block_start_ptr + 2, 2);
uint32_t balance_eur = balance / 100;
uint8_t balance_cents = balance % 100;
size_t uid_len = 0;
const uint8_t* uid = mf_classic_get_uid(data, &uid_len);
// Card Number is printed in HEX (equal to UID)
uint64_t card_number = nfc_util_bytes2num(uid, uid_len);
furi_string_printf(
parsed_data,
"\e#WashCity\nCard number: %0*llX\nBalance: %lu.%02u EUR",
uid_len * 2,
card_number,
balance_eur,
balance_cents);
parsed = true;
} while(false);
return parsed;
}
/* Actual implementation of app<>plugin interface */
static const NfcSupportedCardsPlugin washcity_plugin = {
.protocol = NfcProtocolMfClassic,
.verify = washcity_verify,
.read = washcity_read,
.parse = washcity_parse,
};
/* Plugin descriptor to comply with basic plugin specification */
static const FlipperAppPluginDescriptor washcity_plugin_descriptor = {
.appid = NFC_SUPPORTED_CARD_PLUGIN_APP_ID,
.ep_api_version = NFC_SUPPORTED_CARD_PLUGIN_API_VERSION,
.entry_point = &washcity_plugin,
};
/* Plugin entry point - must return a pointer to const descriptor */
const FlipperAppPluginDescriptor* washcity_plugin_ep() {
return &washcity_plugin_descriptor;
}
@@ -1315,4 +1315,39 @@ CE99FBC8BD26
# Volgograd (Russia) Volna transport cards keys
2B787A063D5D
D37C8F1793F7
D37C8F1793F7
# Bandai Namco Passport [fka Banapassport] / Sega Aime Card
6090D00632F5
019761AA8082
574343467632
A99164400748
62742819AD7C
CC5075E42BA1
B9DF35A0814C
8AF9C718F23D
58CD5C3673CB
FC80E88EB88C
7A3CDAD7C023
30424C029001
024E4E44001F
ECBBFA57C6AD
4757698143BD
1D30972E6485
F8526D1A8D6D
1300EC8C7E80
F80A65A87FFA
DEB06ED4AF8E
4AD96BF28190
000390014D41
0800F9917CB0
730050555253
4146D4A956C4
131157FBB126
E69DD9015A43
337237F254D5
9A8389F32FBF
7B8FB4A7100B
C8382A233993
7B304F2A12A6
FC9418BF788B
@@ -10,8 +10,8 @@ void nfc_scene_delete_success_on_enter(void* context) {
// Setup view
Popup* popup = nfc->popup;
popup_set_icon(popup, 0, 2, &I_DolphinMafia_115x62);
popup_set_header(popup, "Deleted", 83, 19, AlignLeft, AlignBottom);
popup_set_icon(popup, 0, 2, &I_DolphinMafia_119x62);
popup_set_header(popup, "Deleted", 80, 19, AlignLeft, AlignBottom);
popup_set_timeout(popup, 1500);
popup_set_context(popup, nfc);
popup_set_callback(popup, nfc_scene_delete_success_popup_callback);
@@ -17,8 +17,9 @@ void nfc_scene_detect_on_enter(void* context) {
// Setup view
popup_reset(instance->popup);
popup_set_header(instance->popup, "Reading", 97, 15, AlignCenter, AlignTop);
popup_set_text(
instance->popup, "Apply card to\nFlipper's back", 97, 24, AlignCenter, AlignTop);
instance->popup, "Apply card to\nFlipper's back", 97, 27, AlignCenter, AlignTop);
popup_set_icon(instance->popup, 0, 8, &I_NFC_manual_60x50);
view_dispatcher_switch_to_view(instance->view_dispatcher, NfcViewPopup);
@@ -12,9 +12,8 @@ void nfc_scene_exit_confirm_on_enter(void* context) {
dialog_ex_set_left_button_text(dialog_ex, "Exit");
dialog_ex_set_right_button_text(dialog_ex, "Stay");
dialog_ex_set_header(dialog_ex, "Exit to NFC Menu?", 64, 11, AlignCenter, AlignTop);
dialog_ex_set_text(
dialog_ex, "All unsaved data\nwill be lost!", 64, 25, AlignCenter, AlignTop);
dialog_ex_set_header(dialog_ex, "Exit to NFC Menu?", 64, 0, AlignCenter, AlignTop);
dialog_ex_set_text(dialog_ex, "All unsaved data will be lost", 64, 12, AlignCenter, AlignTop);
dialog_ex_set_context(dialog_ex, nfc);
dialog_ex_set_result_callback(dialog_ex, nfc_scene_exit_confirm_dialog_callback);
@@ -175,6 +175,16 @@ void nfc_scene_mf_classic_dict_attack_on_enter(void* context) {
nfc_poller_start(instance->poller, nfc_dict_attack_worker_callback, instance);
}
static void nfc_scene_mf_classic_dict_attack_notify_read(NfcApp* instance) {
const MfClassicData* mfc_data = nfc_poller_get_data(instance->poller);
bool is_card_fully_read = mf_classic_is_card_read(mfc_data);
if(is_card_fully_read) {
notification_message(instance->notifications, &sequence_success);
} else {
notification_message(instance->notifications, &sequence_semi_success);
}
}
bool nfc_scene_mf_classic_dict_attack_on_event(void* context, SceneManagerEvent event) {
NfcApp* instance = context;
bool consumed = false;
@@ -196,7 +206,7 @@ bool nfc_scene_mf_classic_dict_attack_on_event(void* context, SceneManagerEvent
nfc_poller_start(instance->poller, nfc_dict_attack_worker_callback, instance);
consumed = true;
} else {
notification_message(instance->notifications, &sequence_success);
nfc_scene_mf_classic_dict_attack_notify_read(instance);
scene_manager_next_scene(instance->scene_manager, NfcSceneReadSuccess);
dolphin_deed(DolphinDeedNfcReadSuccess);
consumed = true;
@@ -225,13 +235,13 @@ bool nfc_scene_mf_classic_dict_attack_on_event(void* context, SceneManagerEvent
instance->poller = nfc_poller_alloc(instance->nfc, NfcProtocolMfClassic);
nfc_poller_start(instance->poller, nfc_dict_attack_worker_callback, instance);
} else {
notification_message(instance->notifications, &sequence_success);
nfc_scene_mf_classic_dict_attack_notify_read(instance);
scene_manager_next_scene(instance->scene_manager, NfcSceneReadSuccess);
dolphin_deed(DolphinDeedNfcReadSuccess);
}
consumed = true;
} else if(state == DictAttackStateSystemDictInProgress) {
notification_message(instance->notifications, &sequence_success);
nfc_scene_mf_classic_dict_attack_notify_read(instance);
scene_manager_next_scene(instance->scene_manager, NfcSceneReadSuccess);
dolphin_deed(DolphinDeedNfcReadSuccess);
consumed = true;
@@ -11,7 +11,7 @@ void nfc_scene_mf_classic_keys_warn_duplicate_on_enter(void* context) {
// Setup view
Popup* popup = instance->popup;
popup_set_icon(popup, 72, 16, &I_DolphinCommon_56x48);
popup_set_icon(popup, 83, 22, &I_WarningDolphinFlip_45x42);
popup_set_header(popup, "Key already exists!", 64, 3, AlignCenter, AlignTop);
popup_set_text(
popup,
@@ -12,8 +12,8 @@ void nfc_scene_mf_classic_update_initial_success_on_enter(void* context) {
notification_message(instance->notifications, &sequence_success);
Popup* popup = instance->popup;
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
popup_set_header(popup, "Updated!", 11, 20, AlignLeft, AlignBottom);
popup_set_icon(popup, 48, 6, &I_DolphinDone_80x58);
popup_set_header(popup, "Updated", 11, 20, AlignLeft, AlignBottom);
popup_set_timeout(popup, 1500);
popup_set_context(popup, instance);
popup_set_callback(popup, nfc_scene_mf_classic_update_initial_success_popup_callback);
@@ -16,7 +16,7 @@ void nfc_scene_mf_classic_write_initial_fail_on_enter(void* context) {
notification_message(instance->notifications, &sequence_error);
widget_add_icon_element(widget, 72, 17, &I_DolphinCommon_56x48);
widget_add_icon_element(widget, 83, 22, &I_WarningDolphinFlip_45x42);
widget_add_string_element(
widget, 7, 4, AlignLeft, AlignTop, FontPrimary, "Writing gone wrong!");
widget_add_string_multiline_element(
@@ -12,8 +12,8 @@ void nfc_scene_mf_classic_write_initial_success_on_enter(void* context) {
notification_message(instance->notifications, &sequence_success);
Popup* popup = instance->popup;
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
popup_set_header(popup, "Successfully\nwritten", 13, 22, AlignLeft, AlignBottom);
popup_set_header(popup, "Success!", 75, 10, AlignLeft, AlignTop);
popup_set_icon(popup, 0, 9, &I_DolphinSuccess_91x55);
popup_set_timeout(popup, 1500);
popup_set_context(popup, instance);
popup_set_callback(popup, nfc_scene_mf_classic_write_initial_success_popup_callback);
@@ -16,7 +16,7 @@ void nfc_scene_mf_classic_wrong_card_on_enter(void* context) {
notification_message(instance->notifications, &sequence_error);
widget_add_icon_element(widget, 73, 17, &I_DolphinCommon_56x48);
widget_add_icon_element(widget, 83, 22, &I_WarningDolphinFlip_45x42);
widget_add_string_element(
widget, 3, 4, AlignLeft, AlignTop, FontPrimary, "This is wrong card");
widget_add_string_multiline_element(
@@ -40,7 +40,7 @@ void nfc_scene_mf_ultralight_unlock_warn_on_enter(void* context) {
dialog_ex_set_header(dialog_ex, "Risky function!", 64, 4, AlignCenter, AlignTop);
dialog_ex_set_text(
dialog_ex, "Wrong password\ncan block your\ncard.", 4, 18, AlignLeft, AlignTop);
dialog_ex_set_icon(dialog_ex, 73, 20, &I_DolphinCommon_56x48);
dialog_ex_set_icon(dialog_ex, 83, 22, &I_WarningDolphinFlip_45x42);
dialog_ex_set_center_button_text(dialog_ex, "OK");
}
@@ -16,7 +16,7 @@ void nfc_scene_mf_ultralight_write_fail_on_enter(void* context) {
notification_message(instance->notifications, &sequence_error);
widget_add_icon_element(widget, 72, 17, &I_DolphinCommon_56x48);
widget_add_icon_element(widget, 83, 22, &I_WarningDolphinFlip_45x42);
widget_add_string_element(
widget, 7, 4, AlignLeft, AlignTop, FontPrimary, "Writing gone wrong!");
widget_add_string_multiline_element(
@@ -12,8 +12,8 @@ void nfc_scene_mf_ultralight_write_success_on_enter(void* context) {
notification_message(instance->notifications, &sequence_success);
Popup* popup = instance->popup;
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
popup_set_header(popup, "Successfully\nwritten", 13, 22, AlignLeft, AlignBottom);
popup_set_icon(popup, 48, 6, &I_DolphinDone_80x58);
popup_set_header(popup, "Successfully\nwritten", 5, 22, AlignLeft, AlignBottom);
popup_set_timeout(popup, 1500);
popup_set_context(popup, instance);
popup_set_callback(popup, nfc_scene_mf_ultralight_write_success_popup_callback);
@@ -28,8 +28,11 @@ bool nfc_scene_mf_ultralight_write_success_on_event(void* context, SceneManagerE
if(event.type == SceneManagerEventTypeCustom) {
if(event.event == NfcCustomEventViewExit) {
bool was_saved =
scene_manager_has_previous_scene(instance->scene_manager, NfcSceneSavedMenu);
consumed = scene_manager_search_and_switch_to_previous_scene(
instance->scene_manager, NfcSceneSavedMenu);
instance->scene_manager, was_saved ? NfcSceneSavedMenu : NfcSceneReadSuccess);
}
}
return consumed;
@@ -16,7 +16,7 @@ void nfc_scene_mf_ultralight_wrong_card_on_enter(void* context) {
notification_message(instance->notifications, &sequence_error);
widget_add_icon_element(widget, 73, 17, &I_DolphinCommon_56x48);
widget_add_icon_element(widget, 83, 22, &I_WarningDolphinFlip_45x42);
widget_add_string_element(
widget, 3, 4, AlignLeft, AlignTop, FontPrimary, "This is wrong card");
widget_add_string_multiline_element(
@@ -10,8 +10,8 @@ void nfc_scene_restore_original_on_enter(void* context) {
// Setup view
Popup* popup = nfc->popup;
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
popup_set_header(popup, "Original file\nrestored", 13, 22, AlignLeft, AlignBottom);
popup_set_icon(popup, 48, 6, &I_DolphinDone_80x58);
popup_set_header(popup, "Original file\nrestored", 5, 22, AlignLeft, AlignBottom);
popup_set_timeout(popup, 1500);
popup_set_context(popup, nfc);
popup_set_callback(popup, nfc_scene_restore_original_popup_callback);
@@ -12,9 +12,8 @@ void nfc_scene_retry_confirm_on_enter(void* context) {
dialog_ex_set_left_button_text(dialog_ex, "Retry");
dialog_ex_set_right_button_text(dialog_ex, "Stay");
dialog_ex_set_header(dialog_ex, "Retry Reading?", 64, 11, AlignCenter, AlignTop);
dialog_ex_set_text(
dialog_ex, "All unsaved data\nwill be lost!", 64, 25, AlignCenter, AlignTop);
dialog_ex_set_header(dialog_ex, "Retry Reading?", 64, 0, AlignCenter, AlignTop);
dialog_ex_set_text(dialog_ex, "All unsaved data will be lost", 64, 12, AlignCenter, AlignTop);
dialog_ex_set_context(dialog_ex, nfc);
dialog_ex_set_result_callback(dialog_ex, nfc_scene_retry_confirm_dialog_callback);
@@ -29,7 +28,11 @@ bool nfc_scene_retry_confirm_on_event(void* context, SceneManagerEvent event) {
if(event.event == DialogExResultRight) {
consumed = scene_manager_previous_scene(nfc->scene_manager);
} else if(event.event == DialogExResultLeft) {
if(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneDetect)) {
if(scene_manager_has_previous_scene(
nfc->scene_manager, NfcSceneMfUltralightUnlockWarn)) {
consumed = scene_manager_search_and_switch_to_previous_scene(
nfc->scene_manager, NfcSceneMfUltralightUnlockMenu);
} else if(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneDetect)) {
consumed = scene_manager_search_and_switch_to_previous_scene(
nfc->scene_manager, NfcSceneDetect);
} else if(scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneRead)) {
@@ -10,8 +10,8 @@ void nfc_scene_save_success_on_enter(void* context) {
// Setup view
Popup* popup = nfc->popup;
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
popup_set_header(popup, "Saved!", 13, 22, AlignLeft, AlignBottom);
popup_set_icon(popup, 36, 5, &I_DolphinSaved_92x58);
popup_set_header(popup, "Saved", 15, 19, AlignLeft, AlignBottom);
popup_set_timeout(popup, 1500);
popup_set_context(popup, nfc);
popup_set_callback(popup, nfc_scene_save_success_popup_callback);
@@ -50,6 +50,7 @@ static void detect_reader_draw_callback(Canvas* canvas, void* model) {
if(m->state == DetectReaderStateDone) {
canvas_set_font(canvas, FontPrimary);
canvas_draw_str_aligned(canvas, 51, 22, AlignLeft, AlignTop, "Completed!");
canvas_draw_icon(canvas, 20, 23, &I_check_big_20x17);
} else {
canvas_set_font(canvas, FontPrimary);
canvas_draw_str_aligned(canvas, 51, 22, AlignLeft, AlignTop, "Collecting...");
@@ -26,6 +26,7 @@ typedef enum {
//SubGhzCustomEvent
SubGhzCustomEventSceneDeleteSuccess = 100,
SubGhzCustomEventSceneDelete,
SubGhzCustomEventSceneDeleteBack,
SubGhzCustomEventSceneDeleteRAW,
SubGhzCustomEventSceneDeleteRAWBack,
@@ -70,5 +71,6 @@ typedef enum {
SubGhzCustomEventViewTransmitterBack,
SubGhzCustomEventViewTransmitterSendStart,
SubGhzCustomEventViewTransmitterSendStop,
SubGhzCustomEventViewTransmitterSendSave,
SubGhzCustomEventViewTransmitterError,
} SubGhzCustomEvent;
@@ -6,47 +6,57 @@ void subghz_scene_delete_callback(GuiButtonType result, InputType type, void* co
SubGhz* subghz = context;
if((result == GuiButtonTypeRight) && (type == InputTypeShort)) {
view_dispatcher_send_custom_event(subghz->view_dispatcher, SubGhzCustomEventSceneDelete);
} else if((result == GuiButtonTypeLeft) && (type == InputTypeShort)) {
view_dispatcher_send_custom_event(
subghz->view_dispatcher, SubGhzCustomEventSceneDeleteBack);
}
}
void subghz_scene_delete_on_enter(void* context) {
SubGhz* subghz = context;
FuriString* frequency_str;
FuriString* modulation_str;
FuriString* text_out;
FuriString* text;
text_out = furi_string_alloc();
text = furi_string_alloc();
path_extract_filename(subghz->file_path, text, true);
furi_string_cat_printf(text_out, "\e#Delete %s?\e#\n", furi_string_get_cstr(text));
furi_string_reset(text);
subghz_protocol_decoder_base_get_string(subghz_txrx_get_decoder(subghz->txrx), text);
size_t dot = furi_string_search_char(text, '\r');
if(dot > 0) {
furi_string_left(text, dot);
}
furi_string_cat_printf(text_out, "%s\n", furi_string_get_cstr(text));
furi_string_free(text);
frequency_str = furi_string_alloc();
modulation_str = furi_string_alloc();
text = furi_string_alloc();
subghz_txrx_get_frequency_and_modulation(subghz->txrx, frequency_str, modulation_str);
widget_add_string_element(
subghz->widget,
78,
0,
AlignLeft,
AlignTop,
FontSecondary,
furi_string_get_cstr(frequency_str));
widget_add_string_element(
subghz->widget,
113,
0,
AlignLeft,
AlignTop,
FontSecondary,
furi_string_cat_printf(
text_out,
"%s %s",
furi_string_get_cstr(frequency_str),
furi_string_get_cstr(modulation_str));
subghz_protocol_decoder_base_get_string(subghz_txrx_get_decoder(subghz->txrx), text);
widget_add_string_multiline_element(
subghz->widget, 0, 0, AlignLeft, AlignTop, FontSecondary, furi_string_get_cstr(text));
widget_add_text_box_element(
subghz->widget, 0, 0, 128, 54, AlignCenter, AlignTop, furi_string_get_cstr(text_out), false);
furi_string_free(frequency_str);
furi_string_free(modulation_str);
furi_string_free(text);
furi_string_free(text_out);
widget_add_button_element(
subghz->widget, GuiButtonTypeRight, "Delete", subghz_scene_delete_callback, subghz);
widget_add_button_element(
subghz->widget, GuiButtonTypeLeft, "Cancel", subghz_scene_delete_callback, subghz);
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdWidget);
}
@@ -63,6 +73,8 @@ bool subghz_scene_delete_on_event(void* context, SceneManagerEvent event) {
subghz->scene_manager, SubGhzSceneStart);
}
return true;
} else if(event.event == SubGhzCustomEventSceneDeleteBack) {
return scene_manager_previous_scene(subghz->scene_manager);
}
}
return false;
@@ -17,48 +17,37 @@ void subghz_scene_delete_raw_on_enter(void* context) {
SubGhz* subghz = context;
FuriString* frequency_str;
FuriString* modulation_str;
FuriString* text_out;
FuriString* file_name;
text_out = furi_string_alloc();
file_name = furi_string_alloc();
path_extract_filename(subghz->file_path, file_name, true);
furi_string_cat_printf(
text_out, "\e#Delete %s?\e#\nRAW signal\n", furi_string_get_cstr(file_name));
furi_string_free(file_name);
frequency_str = furi_string_alloc();
modulation_str = furi_string_alloc();
subghz_txrx_get_frequency_and_modulation(subghz->txrx, frequency_str, modulation_str);
char delete_str[SUBGHZ_MAX_LEN_NAME + 16];
FuriString* file_name;
file_name = furi_string_alloc();
path_extract_filename(subghz->file_path, file_name, true);
snprintf(delete_str, sizeof(delete_str), "\e#Delete %s?\e#", furi_string_get_cstr(file_name));
furi_string_free(file_name);
furi_string_cat_printf(
text_out,
"%s %s",
furi_string_get_cstr(frequency_str),
furi_string_get_cstr(modulation_str));
widget_add_text_box_element(
subghz->widget, 0, 0, 128, 23, AlignCenter, AlignCenter, delete_str, false);
widget_add_string_element(
subghz->widget, 38, 25, AlignLeft, AlignTop, FontSecondary, "RAW signal");
subghz_txrx_get_frequency_and_modulation(subghz->txrx, frequency_str, modulation_str);
widget_add_string_element(
subghz->widget,
35,
37,
AlignLeft,
AlignTop,
FontSecondary,
furi_string_get_cstr(frequency_str));
widget_add_string_element(
subghz->widget,
72,
37,
AlignLeft,
AlignTop,
FontSecondary,
furi_string_get_cstr(modulation_str));
subghz->widget, 0, 0, 128, 54, AlignCenter, AlignTop, furi_string_get_cstr(text_out), false);
furi_string_free(frequency_str);
furi_string_free(modulation_str);
furi_string_free(text_out);
widget_add_button_element(
subghz->widget, GuiButtonTypeRight, "Delete", subghz_scene_delete_raw_callback, subghz);
widget_add_button_element(
subghz->widget, GuiButtonTypeLeft, "Back", subghz_scene_delete_raw_callback, subghz);
subghz->widget, GuiButtonTypeLeft, "Cancel", subghz_scene_delete_raw_callback, subghz);
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdWidget);
}
@@ -12,8 +12,8 @@ void subghz_scene_delete_success_on_enter(void* context) {
// Setup view
Popup* popup = subghz->popup;
popup_set_icon(popup, 0, 2, &I_DolphinMafia_115x62);
popup_set_header(popup, "Deleted", 83, 19, AlignLeft, AlignBottom);
popup_set_icon(popup, 0, 2, &I_DolphinMafia_119x62);
popup_set_header(popup, "Deleted", 80, 19, AlignLeft, AlignBottom);
popup_set_timeout(popup, 1500);
popup_set_context(popup, subghz);
popup_set_callback(popup, subghz_scene_delete_success_popup_callback);
@@ -15,16 +15,16 @@ void subghz_scene_need_saving_callback(GuiButtonType result, InputType type, voi
void subghz_scene_need_saving_on_enter(void* context) {
SubGhz* subghz = context;
widget_add_string_multiline_element(
subghz->widget, 64, 13, AlignCenter, AlignCenter, FontPrimary, "Exit to Sub-GHz Menu?");
widget_add_string_multiline_element(
widget_add_text_box_element(
subghz->widget,
64,
32,
0,
0,
128,
54,
AlignCenter,
AlignCenter,
FontSecondary,
"All unsaved data\nwill be lost!");
AlignTop,
"\e#Exit to Sub-GHz Menu?\e#\nAll unsaved data will be lost",
false);
widget_add_button_element(
subghz->widget, GuiButtonTypeRight, "Stay", subghz_scene_need_saving_callback, subghz);
@@ -1,20 +1,11 @@
#include "../subghz_i.h"
#include "../helpers/subghz_custom_event.h"
#include "../views/transmitter.h"
void subghz_scene_receiver_info_callback(GuiButtonType result, InputType type, void* context) {
void subghz_scene_receiver_info_callback(SubGhzCustomEvent event, void* context) {
furi_assert(context);
SubGhz* subghz = context;
if((result == GuiButtonTypeCenter) && (type == InputTypePress)) {
view_dispatcher_send_custom_event(
subghz->view_dispatcher, SubGhzCustomEventSceneReceiverInfoTxStart);
} else if((result == GuiButtonTypeCenter) && (type == InputTypeRelease)) {
view_dispatcher_send_custom_event(
subghz->view_dispatcher, SubGhzCustomEventSceneReceiverInfoTxStop);
} else if((result == GuiButtonTypeRight) && (type == InputTypeShort)) {
view_dispatcher_send_custom_event(
subghz->view_dispatcher, SubGhzCustomEventSceneReceiverInfoSave);
}
view_dispatcher_send_custom_event(subghz->view_dispatcher, event);
}
static bool subghz_scene_receiver_info_update_parser(void* context) {
@@ -37,6 +28,28 @@ static bool subghz_scene_receiver_info_update_parser(void* context) {
preset->data,
preset->data_size);
FuriString* key_str = furi_string_alloc();
FuriString* frequency_str = furi_string_alloc();
FuriString* modulation_str = furi_string_alloc();
subghz_protocol_decoder_base_get_string(subghz_txrx_get_decoder(subghz->txrx), key_str);
subghz_txrx_get_frequency_and_modulation(subghz->txrx, frequency_str, modulation_str);
subghz_view_transmitter_add_data_to_show(
subghz->subghz_transmitter,
furi_string_get_cstr(key_str),
furi_string_get_cstr(frequency_str),
furi_string_get_cstr(modulation_str),
subghz_txrx_protocol_is_transmittable(subghz->txrx, true));
furi_string_free(frequency_str);
furi_string_free(modulation_str);
furi_string_free(key_str);
subghz_view_transmitter_set_radio_device_type(
subghz->subghz_transmitter, subghz_txrx_radio_device_get(subghz->txrx));
subghz_view_transmitter_set_model_type(
subghz->subghz_transmitter, SubGhzViewTransmitterModelTypeInfo);
return true;
}
return false;
@@ -44,67 +57,23 @@ static bool subghz_scene_receiver_info_update_parser(void* context) {
void subghz_scene_receiver_info_on_enter(void* context) {
SubGhz* subghz = context;
if(subghz_scene_receiver_info_update_parser(subghz)) {
FuriString* frequency_str = furi_string_alloc();
FuriString* modulation_str = furi_string_alloc();
FuriString* text = furi_string_alloc();
subghz_txrx_get_frequency_and_modulation(subghz->txrx, frequency_str, modulation_str);
widget_add_string_element(
subghz->widget,
78,
0,
AlignLeft,
AlignTop,
FontSecondary,
furi_string_get_cstr(frequency_str));
widget_add_string_element(
subghz->widget,
113,
0,
AlignLeft,
AlignTop,
FontSecondary,
furi_string_get_cstr(modulation_str));
subghz_protocol_decoder_base_get_string(subghz_txrx_get_decoder(subghz->txrx), text);
widget_add_string_multiline_element(
subghz->widget, 0, 0, AlignLeft, AlignTop, FontSecondary, furi_string_get_cstr(text));
furi_string_free(frequency_str);
furi_string_free(modulation_str);
furi_string_free(text);
if(subghz_txrx_protocol_is_serializable(subghz->txrx)) {
widget_add_button_element(
subghz->widget,
GuiButtonTypeRight,
"Save",
subghz_scene_receiver_info_callback,
subghz);
}
if(subghz_txrx_protocol_is_transmittable(subghz->txrx, true)) {
widget_add_button_element(
subghz->widget,
GuiButtonTypeCenter,
"Send",
subghz_scene_receiver_info_callback,
subghz);
}
} else {
widget_add_icon_element(subghz->widget, 37, 15, &I_DolphinCommon_56x48);
widget_add_string_element(
subghz->widget, 13, 8, AlignLeft, AlignBottom, FontSecondary, "Error history parse.");
view_dispatcher_send_custom_event(
subghz->view_dispatcher, SubGhzCustomEventSceneShowErrorSub);
}
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdWidget);
subghz_view_transmitter_set_callback(
subghz->subghz_transmitter, subghz_scene_receiver_info_callback, subghz);
subghz->state_notifications = SubGhzNotificationStateIDLE;
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdTransmitter);
}
bool subghz_scene_receiver_info_on_event(void* context, SceneManagerEvent event) {
SubGhz* subghz = context;
if(event.type == SceneManagerEventTypeCustom) {
if(event.event == SubGhzCustomEventSceneReceiverInfoTxStart) {
if(event.event == SubGhzCustomEventViewTransmitterSendStart) {
if(!subghz_scene_receiver_info_update_parser(subghz)) {
return false;
}
@@ -120,7 +89,7 @@ bool subghz_scene_receiver_info_on_event(void* context, SceneManagerEvent event)
subghz->state_notifications = SubGhzNotificationStateTx;
}
return true;
} else if(event.event == SubGhzCustomEventSceneReceiverInfoTxStop) {
} else if(event.event == SubGhzCustomEventViewTransmitterSendStop) {
//CC1101 Stop Tx -> Start RX
subghz->state_notifications = SubGhzNotificationStateIDLE;
@@ -129,7 +98,7 @@ bool subghz_scene_receiver_info_on_event(void* context, SceneManagerEvent event)
subghz_txrx_hopper_unpause(subghz->txrx);
subghz->state_notifications = SubGhzNotificationStateRx;
return true;
} else if(event.event == SubGhzCustomEventSceneReceiverInfoSave) {
} else if(event.event == SubGhzCustomEventViewTransmitterSendSave) {
//CC1101 Stop RX -> Save
subghz->state_notifications = SubGhzNotificationStateIDLE;
subghz_txrx_hopper_set_state(subghz->txrx, SubGhzHopperStateOFF);
@@ -144,7 +113,11 @@ bool subghz_scene_receiver_info_on_event(void* context, SceneManagerEvent event)
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSaveName);
}
return true;
} else if(event.event == SubGhzCustomEventSceneShowErrorSub) {
furi_string_set(subghz->error_str, "Error history parse.");
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowErrorSub);
}
} else if(event.type == SceneManagerEventTypeTick) {
if(subghz_txrx_hopper_get_state(subghz->txrx) != SubGhzHopperStateOFF) {
subghz_txrx_hopper_update(subghz->txrx);
@@ -6,12 +6,13 @@ void subghz_scene_region_info_on_enter(void* context) {
SubGhz* subghz = context;
const FuriHalRegion* const region = furi_hal_region_get();
FuriString* buffer = furi_string_alloc();
if(region) {
furi_string_cat_printf(buffer, "Region: %s, bands:\n", region->country_code);
furi_string_cat_printf(buffer, "Region: %s\nBands:\n", region->country_code);
for(uint16_t i = 0; i < region->bands_count; ++i) {
furi_string_cat_printf(
buffer,
" %lu-%lu kHz\n",
"%lu-%lu kHz\n",
region->bands[i].start / 1000,
region->bands[i].end / 1000);
}
@@ -20,7 +21,10 @@ void subghz_scene_region_info_on_enter(void* context) {
}
widget_add_string_multiline_element(
subghz->widget, 0, 0, AlignLeft, AlignTop, FontSecondary, furi_string_get_cstr(buffer));
subghz->widget, 0, 0, AlignLeft, AlignTop, FontPrimary, "Region Information");
widget_add_string_multiline_element(
subghz->widget, 0, 13, AlignLeft, AlignTop, FontSecondary, furi_string_get_cstr(buffer));
furi_string_free(buffer);
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdWidget);
@@ -132,7 +132,7 @@ bool subghz_scene_save_name_on_event(void* context, SceneManagerEvent event) {
scene_manager_set_scene_state(
subghz->scene_manager, SubGhzSceneReadRAW, SubGhzCustomEventManagerNoSet);
} else {
subghz_file_name_clear(subghz);
furi_string_reset(subghz->file_path_tmp);
}
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSaveSuccess);
@@ -11,8 +11,8 @@ void subghz_scene_save_success_on_enter(void* context) {
// Setup view
Popup* popup = subghz->popup;
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
popup_set_header(popup, "Saved!", 13, 22, AlignLeft, AlignBottom);
popup_set_icon(popup, 36, 5, &I_DolphinSaved_92x58);
popup_set_header(popup, "Saved", 15, 19, AlignLeft, AlignBottom);
popup_set_timeout(popup, 1500);
popup_set_context(popup, subghz);
popup_set_callback(popup, subghz_scene_save_success_popup_callback);
@@ -22,5 +22,7 @@ bool subghz_scene_saved_on_event(void* context, SceneManagerEvent event) {
}
void subghz_scene_saved_on_exit(void* context) {
SubGhz* subghz = context;
scene_manager_set_scene_state(subghz->scene_manager, SubGhzSceneSavedMenu, 0);
UNUSED(context);
}
@@ -11,7 +11,7 @@ void subghz_scene_show_error_sub_on_enter(void* context) {
// Setup view
Popup* popup = subghz->popup;
popup_set_icon(popup, 72, 17, &I_DolphinCommon_56x48);
popup_set_icon(popup, 83, 22, &I_WarningDolphinFlip_45x42);
popup_set_header(popup, furi_string_get_cstr(subghz->error_str), 14, 15, AlignLeft, AlignTop);
popup_set_timeout(popup, 1500);
popup_set_context(popup, subghz);
@@ -21,7 +21,7 @@ void subghz_scene_show_only_rx_on_enter(void* context) {
popup_set_header(popup, header_text, 63, 3, AlignCenter, AlignTop);
popup_set_text(popup, message_text, 0, 17, AlignLeft, AlignTop);
popup_set_icon(popup, 72, 17, &I_DolphinCommon_56x48);
popup_set_icon(popup, 83, 22, &I_WarningDolphinFlip_45x42);
popup_set_timeout(popup, 1500);
popup_set_context(popup, subghz);
@@ -37,6 +37,8 @@ bool subghz_scene_transmitter_update_data_show(void* context) {
}
subghz_view_transmitter_set_radio_device_type(
subghz->subghz_transmitter, subghz_txrx_radio_device_get(subghz->txrx));
subghz_view_transmitter_set_model_type(
subghz->subghz_transmitter, SubGhzViewTransmitterModelTypeTx);
return ret;
}
+1 -1
View File
@@ -70,7 +70,7 @@ void subghz_dialog_message_show_only_rx(SubGhz* subghz) {
dialog_message_set_header(message, header_text, 63, 3, AlignCenter, AlignTop);
dialog_message_set_text(message, message_text, 0, 17, AlignLeft, AlignTop);
dialog_message_set_icon(message, &I_DolphinCommon_56x48, 72, 17);
dialog_message_set_icon(message, &I_WarningDolphinFlip_45x42, 83, 22);
dialog_message_show(dialogs, message);
dialog_message_free(message);
+2 -2
View File
@@ -251,9 +251,9 @@ void subghz_view_receiver_draw(Canvas* canvas, SubGhzViewReceiverModel* model) {
}
if(model->device_type == SubGhzRadioDeviceTypeInternal) {
canvas_draw_icon(canvas, 108, 0, &I_Internal_antenna_20x12);
canvas_draw_icon(canvas, 109, 0, &I_Internal_ant_1_9x11);
} else {
canvas_draw_icon(canvas, 108, 0, &I_External_antenna_20x12);
canvas_draw_icon(canvas, 109, 0, &I_External_ant_1_9x11);
}
subghz_view_rssi_draw(canvas, model);
@@ -178,7 +178,7 @@ void subghz_frequency_analyzer_draw(Canvas* canvas, SubGhzFrequencyAnalyzerModel
subghz_frequency_analyzer_log_frequency_draw(canvas, model);
} else {
canvas_draw_str(canvas, 0, 8, "Frequency Analyzer");
canvas_draw_icon(canvas, 108, 0, &I_Internal_antenna_20x12);
canvas_draw_icon(canvas, 109, 0, &I_Internal_ant_1_9x11);
canvas_draw_str(canvas, 0, 64, "RSSI");
subghz_frequency_analyzer_draw_rssi(canvas, model->rssi, 20, 64);
@@ -294,9 +294,9 @@ void subghz_read_raw_draw(Canvas* canvas, SubGhzReadRAWModel* model) {
canvas, 106, 2, AlignRight, AlignTop, furi_string_get_cstr(model->sample_write));
if(model->device_type == SubGhzRadioDeviceTypeInternal) {
canvas_draw_icon(canvas, 108, 0, &I_Internal_antenna_20x12);
canvas_draw_icon(canvas, 109, 0, &I_Internal_ant_1_9x11);
} else {
canvas_draw_icon(canvas, 108, 0, &I_External_antenna_20x12);
canvas_draw_icon(canvas, 109, 0, &I_External_ant_1_9x11);
}
canvas_draw_line(canvas, 0, 14, 115, 14);
canvas_draw_line(canvas, 0, 48, 115, 48);
+52 -4
View File
@@ -16,6 +16,9 @@ typedef struct {
FuriString* key_str;
bool show_button;
SubGhzRadioDeviceType device_type;
SubGhzViewTransmitterModelType model_type;
IconAnimation* icon_int_ant;
IconAnimation* icon_ext_ant;
} SubGhzViewTransmitterModel;
void subghz_view_transmitter_set_callback(
@@ -58,6 +61,17 @@ void subghz_view_transmitter_set_radio_device_type(
true);
}
void subghz_view_transmitter_set_model_type(
SubGhzViewTransmitter* subghz_transmitter,
SubGhzViewTransmitterModelType model_type) {
furi_assert(subghz_transmitter);
with_view_model(
subghz_transmitter->view,
SubGhzViewTransmitterModel * model,
{ model->model_type = model_type; },
true);
}
static void subghz_view_transmitter_button_right(Canvas* canvas, const char* str) {
const uint8_t button_height = 12;
const uint8_t vertical_offset = 3;
@@ -100,13 +114,21 @@ void subghz_view_transmitter_draw(Canvas* canvas, SubGhzViewTransmitterModel* mo
canvas, 0, 0, AlignLeft, AlignTop, furi_string_get_cstr(model->key_str));
canvas_draw_str(canvas, 78, 7, furi_string_get_cstr(model->frequency_str));
canvas_draw_str(canvas, 113, 7, furi_string_get_cstr(model->preset_str));
if(model->show_button) {
if(model->device_type == SubGhzRadioDeviceTypeInternal) {
canvas_draw_icon(canvas, 108, 39, &I_Internal_antenna_20x12);
if(model->model_type == SubGhzViewTransmitterModelTypeInfo) {
elements_button_center(canvas, "Send");
elements_button_right(canvas, "Save");
} else {
canvas_draw_icon(canvas, 108, 39, &I_External_antenna_20x12);
//default type SubGhzViewTransmitterModelTypeTx
subghz_view_transmitter_button_right(canvas, "Send");
}
if(model->device_type == SubGhzRadioDeviceTypeInternal) {
canvas_draw_icon_animation(canvas, 109, 40, model->icon_int_ant);
} else {
canvas_draw_icon_animation(canvas, 109, 40, model->icon_ext_ant);
}
subghz_view_transmitter_button_right(canvas, "Send");
}
}
@@ -140,13 +162,32 @@ bool subghz_view_transmitter_input(InputEvent* event, void* context) {
true);
if(can_be_sent && event->key == InputKeyOk && event->type == InputTypePress) {
with_view_model(
subghz_transmitter->view,
SubGhzViewTransmitterModel * model,
{
icon_animation_start(model->icon_int_ant);
icon_animation_start(model->icon_ext_ant);
},
false);
subghz_transmitter->callback(
SubGhzCustomEventViewTransmitterSendStart, subghz_transmitter->context);
return true;
} else if(can_be_sent && event->key == InputKeyOk && event->type == InputTypeRelease) {
with_view_model(
subghz_transmitter->view,
SubGhzViewTransmitterModel * model,
{
icon_animation_stop(model->icon_int_ant);
icon_animation_stop(model->icon_ext_ant);
},
false);
subghz_transmitter->callback(
SubGhzCustomEventViewTransmitterSendStop, subghz_transmitter->context);
return true;
} else if(can_be_sent && event->key == InputKeyRight && event->type == InputTypeShort) {
subghz_transmitter->callback(
SubGhzCustomEventViewTransmitterSendSave, subghz_transmitter->context);
}
return true;
@@ -181,6 +222,11 @@ SubGhzViewTransmitter* subghz_view_transmitter_alloc() {
model->frequency_str = furi_string_alloc();
model->preset_str = furi_string_alloc();
model->key_str = furi_string_alloc();
model->model_type = SubGhzViewTransmitterModelTypeTx;
model->icon_int_ant = icon_animation_alloc(&A_SubGhz_Internal_ant);
view_tie_icon_animation(subghz_transmitter->view, model->icon_int_ant);
model->icon_ext_ant = icon_animation_alloc(&A_SubGhz_External_ant);
view_tie_icon_animation(subghz_transmitter->view, model->icon_ext_ant);
},
true);
return subghz_transmitter;
@@ -196,6 +242,8 @@ void subghz_view_transmitter_free(SubGhzViewTransmitter* subghz_transmitter) {
furi_string_free(model->frequency_str);
furi_string_free(model->preset_str);
furi_string_free(model->key_str);
icon_animation_free(model->icon_int_ant);
icon_animation_free(model->icon_ext_ant);
},
true);
view_free(subghz_transmitter->view);
@@ -6,6 +6,11 @@
typedef struct SubGhzViewTransmitter SubGhzViewTransmitter;
typedef enum {
SubGhzViewTransmitterModelTypeTx,
SubGhzViewTransmitterModelTypeInfo,
} SubGhzViewTransmitterModelType;
typedef void (*SubGhzViewTransmitterCallback)(SubGhzCustomEvent event, void* context);
void subghz_view_transmitter_set_callback(
@@ -17,6 +22,10 @@ void subghz_view_transmitter_set_radio_device_type(
SubGhzViewTransmitter* subghz_transmitter,
SubGhzRadioDeviceType device_type);
void subghz_view_transmitter_set_model_type(
SubGhzViewTransmitter* subghz_transmitter,
SubGhzViewTransmitterModelType model_type);
SubGhzViewTransmitter* subghz_view_transmitter_alloc();
void subghz_view_transmitter_free(SubGhzViewTransmitter* subghz_transmitter);
+1 -1
View File
@@ -414,7 +414,7 @@ bool desktop_api_is_locked(Desktop* instance) {
void desktop_api_unlock(Desktop* instance) {
furi_assert(instance);
view_dispatcher_send_custom_event(instance->view_dispatcher, DesktopLockedEventUnlocked);
view_dispatcher_send_custom_event(instance->view_dispatcher, DesktopGlobalApiUnlock);
}
FuriPubSub* desktop_api_get_status_pubsub(Desktop* instance) {
@@ -83,6 +83,7 @@ bool desktop_scene_locked_on_event(void* context, SceneManagerEvent event) {
if(event.type == SceneManagerEventTypeCustom) {
switch(event.event) {
case DesktopLockedEventUnlocked:
case DesktopGlobalApiUnlock:
desktop_unlock(desktop);
consumed = true;
break;
@@ -126,6 +126,7 @@ bool desktop_scene_pin_input_on_event(void* context, SceneManagerEvent event) {
consumed = true;
break;
case DesktopPinInputEventUnlocked:
case DesktopGlobalApiUnlock:
desktop_unlock(desktop);
consumed = true;
break;
@@ -50,4 +50,5 @@ typedef enum {
DesktopGlobalBeforeAppStarted,
DesktopGlobalAfterAppFinished,
DesktopGlobalAutoLock,
DesktopGlobalApiUnlock,
} DesktopEvent;
+1 -1
View File
@@ -55,7 +55,7 @@ LoaderStatus loader_start_with_gui_error(Loader* loader, const char* name, const
DialogMessage* message = dialog_message_alloc();
dialog_message_set_header(message, "Update needed", 64, 3, AlignCenter, AlignTop);
dialog_message_set_buttons(message, NULL, NULL, NULL);
dialog_message_set_icon(message, &I_DolphinCommon_56x48, 72, 17);
dialog_message_set_icon(message, &I_WarningDolphinFlip_45x42, 83, 22);
dialog_message_set_text(
message, "Update firmware\nto run this app", 3, 26, AlignLeft, AlignTop);
dialog_message_show(dialogs, message);
@@ -519,6 +519,24 @@ const NotificationSequence sequence_success = {
NULL,
};
const NotificationSequence sequence_semi_success = {
&message_display_backlight_on,
&message_green_255,
&message_vibro_on,
&message_note_c4,
&message_delay_50,
&message_note_e4,
&message_delay_50,
&message_note_g4,
&message_delay_50,
&message_sound_off,
&message_delay_50,
&message_note_c5,
&message_delay_50,
&message_sound_off,
NULL,
};
const NotificationSequence sequence_error = {
&message_display_backlight_on,
&message_red_255,
@@ -138,6 +138,7 @@ extern const NotificationSequence sequence_blink_stop;
extern const NotificationSequence sequence_single_vibro;
extern const NotificationSequence sequence_double_vibro;
extern const NotificationSequence sequence_success;
extern const NotificationSequence sequence_semi_success;
extern const NotificationSequence sequence_error;
extern const NotificationSequence sequence_audiovisual_alert;
+75 -51
View File
@@ -5,6 +5,41 @@
#include <flipper.pb.h>
#include <gui.pb.h>
// Contract assertion
_Static_assert(InputKeyMAX == 6, "InputKeyMAX");
_Static_assert(InputTypeMAX == 5, "InputTypeMAX");
_Static_assert(InputKeyUp == (int32_t)PB_Gui_InputKey_UP, "InputKeyUp != PB_Gui_InputKey_UP");
_Static_assert(
InputKeyDown == (int32_t)PB_Gui_InputKey_DOWN,
"InputKeyDown != PB_Gui_InputKey_DOWN");
_Static_assert(
InputKeyRight == (int32_t)PB_Gui_InputKey_RIGHT,
"InputKeyRight != PB_Gui_InputKey_RIGHT");
_Static_assert(
InputKeyLeft == (int32_t)PB_Gui_InputKey_LEFT,
"InputKeyLeft != PB_Gui_InputKey_LEFT");
_Static_assert(InputKeyOk == (int32_t)PB_Gui_InputKey_OK, "InputKeyOk != PB_Gui_InputKey_OK");
_Static_assert(
InputKeyBack == (int32_t)PB_Gui_InputKey_BACK,
"InputKeyBack != PB_Gui_InputKey_BACK");
_Static_assert(
InputTypePress == (int32_t)PB_Gui_InputType_PRESS,
"InputTypePress != PB_Gui_InputType_PRESS");
_Static_assert(
InputTypeRelease == (int32_t)PB_Gui_InputType_RELEASE,
"InputTypeRelease != PB_Gui_InputType_RELEASE");
_Static_assert(
InputTypeShort == (int32_t)PB_Gui_InputType_SHORT,
"InputTypeShort != PB_Gui_InputType_SHORT");
_Static_assert(
InputTypeLong == (int32_t)PB_Gui_InputType_LONG,
"InputTypeLong != PB_Gui_InputType_LONG");
_Static_assert(
InputTypeRepeat == (int32_t)PB_Gui_InputType_REPEAT,
"InputTypeRepeat != PB_Gui_InputType_REPEAT");
#define TAG "RpcGui"
typedef enum {
@@ -168,63 +203,20 @@ static void
RpcSession* session = rpc_gui->session;
furi_assert(session);
InputEvent event;
bool is_valid = (request->content.gui_send_input_event_request.key < (int32_t)InputKeyMAX) &&
(request->content.gui_send_input_event_request.type < (int32_t)InputTypeMAX);
bool invalid = false;
switch(request->content.gui_send_input_event_request.key) {
case PB_Gui_InputKey_UP:
event.key = InputKeyUp;
break;
case PB_Gui_InputKey_DOWN:
event.key = InputKeyDown;
break;
case PB_Gui_InputKey_RIGHT:
event.key = InputKeyRight;
break;
case PB_Gui_InputKey_LEFT:
event.key = InputKeyLeft;
break;
case PB_Gui_InputKey_OK:
event.key = InputKeyOk;
break;
case PB_Gui_InputKey_BACK:
event.key = InputKeyBack;
break;
default:
// Invalid key
invalid = true;
break;
}
switch(request->content.gui_send_input_event_request.type) {
case PB_Gui_InputType_PRESS:
event.type = InputTypePress;
break;
case PB_Gui_InputType_RELEASE:
event.type = InputTypeRelease;
break;
case PB_Gui_InputType_SHORT:
event.type = InputTypeShort;
break;
case PB_Gui_InputType_LONG:
event.type = InputTypeLong;
break;
case PB_Gui_InputType_REPEAT:
event.type = InputTypeRepeat;
break;
default:
// Invalid type
invalid = true;
break;
}
if(invalid) {
if(!is_valid) {
rpc_send_and_release_empty(
session, request->command_id, PB_CommandStatus_ERROR_INVALID_PARAMETERS);
return;
}
InputEvent event = {
.key = (int32_t)request->content.gui_send_input_event_request.key,
.type = (int32_t)request->content.gui_send_input_event_request.type,
};
// Event sequence shenanigans
event.sequence_source = INPUT_SEQUENCE_SOURCE_SOFTWARE;
if(event.type == InputTypePress) {
@@ -264,6 +256,29 @@ static void rpc_system_gui_virtual_display_render_callback(Canvas* canvas, void*
canvas_draw_xbm(canvas, 0, 0, canvas->width, canvas->height, rpc_gui->virtual_display_buffer);
}
static void rpc_system_gui_virtual_display_input_callback(InputEvent* event, void* context) {
furi_assert(event);
furi_assert(event->key < InputKeyMAX);
furi_assert(event->type < InputTypeMAX);
furi_assert(context);
RpcGuiSystem* rpc_gui = context;
RpcSession* session = rpc_gui->session;
FURI_LOG_D(TAG, "VirtulDisplay: SendInputEvent");
PB_Main rpc_message = {
.command_id = 0,
.command_status = PB_CommandStatus_OK,
.has_next = false,
.which_content = PB_Main_gui_send_input_event_request_tag,
.content.gui_send_input_event_request.key = (int32_t)event->key,
.content.gui_send_input_event_request.type = (int32_t)event->type,
};
rpc_send_and_release(session, &rpc_message);
}
static void rpc_system_gui_start_virtual_display_process(const PB_Main* request, void* context) {
furi_assert(request);
furi_assert(context);
@@ -300,6 +315,15 @@ static void rpc_system_gui_start_virtual_display_process(const PB_Main* request,
rpc_gui->virtual_display_view_port,
rpc_system_gui_virtual_display_render_callback,
rpc_gui);
if(request->content.gui_start_virtual_display_request.send_input) {
FURI_LOG_D(TAG, "VirtulDisplay: input forwarding requested");
view_port_input_callback_set(
rpc_gui->virtual_display_view_port,
rpc_system_gui_virtual_display_input_callback,
rpc_gui);
}
gui_add_view_port(rpc_gui->gui, rpc_gui->virtual_display_view_port, GuiLayerFullscreen);
rpc_send_and_release_empty(session, request->command_id, PB_CommandStatus_OK);
+62 -25
View File
@@ -11,7 +11,7 @@
typedef DialogMessageButton (*AboutDialogScreen)(DialogsApp* dialogs, DialogMessage* message);
static DialogMessageButton product_screen(DialogsApp* dialogs, DialogMessage* message) {
static DialogMessageButton about_screen_product(DialogsApp* dialogs, DialogMessage* message) {
DialogMessageButton result;
FuriString* screen_header = furi_string_alloc_printf(
@@ -31,8 +31,6 @@ static DialogMessageButton product_screen(DialogsApp* dialogs, DialogMessage* me
dialog_message_set_text(
message, furi_string_get_cstr(screen_text), 0, 26, AlignLeft, AlignTop);
result = dialog_message_show(dialogs, message);
dialog_message_set_header(message, NULL, 0, 0, AlignLeft, AlignTop);
dialog_message_set_text(message, NULL, 0, 0, AlignLeft, AlignTop);
furi_string_free(screen_header);
furi_string_free(screen_text);
@@ -40,7 +38,7 @@ static DialogMessageButton product_screen(DialogsApp* dialogs, DialogMessage* me
return result;
}
static DialogMessageButton address_screen(DialogsApp* dialogs, DialogMessage* message) {
static DialogMessageButton about_screen_address(DialogsApp* dialogs, DialogMessage* message) {
DialogMessageButton result;
const char* screen_text = "Flipper Devices Inc\n"
@@ -50,12 +48,11 @@ static DialogMessageButton address_screen(DialogsApp* dialogs, DialogMessage* me
dialog_message_set_text(message, screen_text, 0, 0, AlignLeft, AlignTop);
result = dialog_message_show(dialogs, message);
dialog_message_set_text(message, NULL, 0, 0, AlignLeft, AlignTop);
return result;
}
static DialogMessageButton compliance_screen(DialogsApp* dialogs, DialogMessage* message) {
static DialogMessageButton about_screen_compliance(DialogsApp* dialogs, DialogMessage* message) {
DialogMessageButton result;
const char* screen_text = "For all compliance\n"
@@ -64,35 +61,71 @@ static DialogMessageButton compliance_screen(DialogsApp* dialogs, DialogMessage*
dialog_message_set_text(message, screen_text, 0, 0, AlignLeft, AlignTop);
result = dialog_message_show(dialogs, message);
dialog_message_set_text(message, NULL, 0, 0, AlignLeft, AlignTop);
return result;
}
static DialogMessageButton icon1_screen(DialogsApp* dialogs, DialogMessage* message) {
static DialogMessageButton about_screen_icon1(DialogsApp* dialogs, DialogMessage* message) {
DialogMessageButton result;
dialog_message_set_icon(message, &I_Certification1_103x56, 13, 0);
result = dialog_message_show(dialogs, message);
dialog_message_set_icon(message, NULL, 0, 0);
return result;
}
static DialogMessageButton icon2_screen(DialogsApp* dialogs, DialogMessage* message) {
static DialogMessageButton about_screen_icon2(DialogsApp* dialogs, DialogMessage* message) {
DialogMessageButton result;
dialog_message_set_icon(message, &I_Certification2_46x33, 15, 10);
dialog_message_set_text(
message, furi_hal_version_get_mic_id(), 63, 27, AlignLeft, AlignCenter);
result = dialog_message_show(dialogs, message);
dialog_message_set_icon(message, NULL, 0, 0);
dialog_message_set_text(message, NULL, 0, 0, AlignLeft, AlignTop);
return result;
}
static DialogMessageButton hw_version_screen(DialogsApp* dialogs, DialogMessage* message) {
static DialogMessageButton about_screen_cert_china_0(DialogsApp* dialogs, DialogMessage* message) {
DialogMessageButton result;
dialog_message_set_icon(message, &I_CertificationChina0_121x41, 3, 3);
result = dialog_message_show(dialogs, message);
return result;
}
static DialogMessageButton about_screen_cert_china_1(DialogsApp* dialogs, DialogMessage* message) {
DialogMessageButton result;
dialog_message_set_icon(message, &I_CertificationChina1_122x47, 3, 3);
dialog_message_set_text(
message, furi_hal_version_get_srrc_id(), 55, 11, AlignLeft, AlignBottom);
result = dialog_message_show(dialogs, message);
return result;
}
static DialogMessageButton about_screen_cert_taiwan(DialogsApp* dialogs, DialogMessage* message) {
DialogMessageButton result;
dialog_message_set_icon(message, &I_CertificationTaiwan_33x32, 3, 10);
dialog_message_set_text(
message, furi_hal_version_get_ncc_id(), 39, 30, AlignLeft, AlignBottom);
result = dialog_message_show(dialogs, message);
return result;
}
static DialogMessageButton about_screen_cert_mexico(DialogsApp* dialogs, DialogMessage* message) {
DialogMessageButton result;
dialog_message_set_icon(message, &I_CertificationMexico_98x41, 17, 4);
result = dialog_message_show(dialogs, message);
return result;
}
static DialogMessageButton about_screen_hw_version(DialogsApp* dialogs, DialogMessage* message) {
DialogMessageButton result;
FuriString* buffer;
buffer = furi_string_alloc();
@@ -118,14 +151,12 @@ static DialogMessageButton hw_version_screen(DialogsApp* dialogs, DialogMessage*
dialog_message_set_header(message, "HW Version Info:", 0, 0, AlignLeft, AlignTop);
dialog_message_set_text(message, furi_string_get_cstr(buffer), 0, 13, AlignLeft, AlignTop);
result = dialog_message_show(dialogs, message);
dialog_message_set_text(message, NULL, 0, 0, AlignLeft, AlignTop);
dialog_message_set_header(message, NULL, 0, 0, AlignLeft, AlignTop);
furi_string_free(buffer);
return result;
}
static DialogMessageButton fw_version_screen(DialogsApp* dialogs, DialogMessage* message) {
static DialogMessageButton about_screen_fw_version(DialogsApp* dialogs, DialogMessage* message) {
DialogMessageButton result;
FuriString* buffer;
buffer = furi_string_alloc();
@@ -157,21 +188,23 @@ static DialogMessageButton fw_version_screen(DialogsApp* dialogs, DialogMessage*
dialog_message_set_header(message, "FW Version Info:", 0, 0, AlignLeft, AlignTop);
dialog_message_set_text(message, furi_string_get_cstr(buffer), 0, 13, AlignLeft, AlignTop);
result = dialog_message_show(dialogs, message);
dialog_message_set_text(message, NULL, 0, 0, AlignLeft, AlignTop);
dialog_message_set_header(message, NULL, 0, 0, AlignLeft, AlignTop);
furi_string_free(buffer);
return result;
}
const AboutDialogScreen about_screens[] = {
product_screen,
compliance_screen,
address_screen,
icon1_screen,
icon2_screen,
hw_version_screen,
fw_version_screen};
about_screen_product,
about_screen_compliance,
about_screen_address,
about_screen_icon1,
about_screen_icon2,
about_screen_cert_china_0,
about_screen_cert_china_1,
about_screen_cert_taiwan,
about_screen_cert_mexico,
about_screen_hw_version,
about_screen_fw_version};
int32_t about_settings_app(void* p) {
UNUSED(p);
@@ -201,6 +234,10 @@ int32_t about_settings_app(void* p) {
screen_result = about_screens[screen_index](dialogs, message);
dialog_message_set_icon(message, NULL, 0, 0);
dialog_message_set_header(message, NULL, 0, 0, AlignLeft, AlignTop);
dialog_message_set_text(message, NULL, 0, 0, AlignLeft, AlignTop);
if(screen_result == DialogMessageButtonLeft) {
if(screen_index <= 0) {
break;
@@ -10,7 +10,7 @@ void bt_settings_scene_forget_dev_success_on_enter(void* context) {
BtSettingsApp* app = context;
Popup* popup = app->popup;
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
popup_set_icon(popup, 48, 6, &I_DolphinDone_80x58);
popup_set_header(popup, "Done", 14, 15, AlignLeft, AlignTop);
popup_set_timeout(popup, 1500);
popup_set_context(popup, app);
@@ -24,8 +24,8 @@ void desktop_settings_scene_pin_disable_on_enter(void* context) {
popup_set_context(app->popup, app);
popup_set_callback(app->popup, pin_disable_back_callback);
popup_set_icon(app->popup, 0, 2, &I_DolphinMafia_115x62);
popup_set_header(app->popup, "PIN\ndeleted!", 95, 9, AlignCenter, AlignCenter);
popup_set_icon(app->popup, 0, 2, &I_DolphinMafia_119x62);
popup_set_header(app->popup, "Deleted", 80, 19, AlignLeft, AlignBottom);
popup_set_timeout(app->popup, 1500);
popup_enable_timeout(app->popup);
view_dispatcher_switch_to_view(app->view_dispatcher, DesktopSettingsAppViewIdPopup);
@@ -125,7 +125,7 @@ void storage_settings_scene_benchmark_on_enter(void* context) {
view_dispatcher_switch_to_view(app->view_dispatcher, StorageSettingsViewDialogEx);
if(sd_status != FSE_OK) {
dialog_ex_set_icon(dialog_ex, 72, 17, &I_DolphinCommon_56x48);
dialog_ex_set_icon(dialog_ex, 83, 22, &I_WarningDolphinFlip_45x42);
dialog_ex_set_header(dialog_ex, "SD Card Not Mounted", 64, 3, AlignCenter, AlignTop);
dialog_ex_set_text(
dialog_ex, "Try to reinsert\nor format SD\ncard.", 3, 19, AlignLeft, AlignTop);
@@ -14,7 +14,7 @@ void storage_settings_scene_format_confirm_on_enter(void* context) {
FS_Error sd_status = storage_sd_status(app->fs_api);
if(sd_status == FSE_NOT_READY) {
dialog_ex_set_icon(dialog_ex, 72, 17, &I_DolphinCommon_56x48);
dialog_ex_set_icon(dialog_ex, 83, 22, &I_WarningDolphinFlip_45x42);
dialog_ex_set_header(dialog_ex, "SD Card Not Mounted", 64, 3, AlignCenter, AlignTop);
dialog_ex_set_text(
dialog_ex, "Try to reinsert\nor format SD\ncard.", 3, 19, AlignLeft, AlignTop);
@@ -47,7 +47,7 @@ void storage_settings_scene_formatting_on_enter(void* context) {
dialog_ex_set_text(
dialog_ex, storage_error_get_desc(error), 64, 32, AlignCenter, AlignCenter);
} else {
dialog_ex_set_icon(dialog_ex, 72, 17, &I_DolphinCommon_56x48);
dialog_ex_set_icon(dialog_ex, 83, 22, &I_WarningDolphinFlip_45x42);
dialog_ex_set_header(dialog_ex, "Format\ncomplete!", 14, 15, AlignLeft, AlignTop);
}
dialog_ex_set_center_button_text(dialog_ex, "OK");
@@ -19,7 +19,7 @@ void storage_settings_scene_sd_info_on_enter(void* context) {
dialog_ex_set_result_callback(dialog_ex, storage_settings_scene_sd_info_dialog_callback);
if(sd_status != FSE_OK) {
dialog_ex_set_icon(dialog_ex, 72, 17, &I_DolphinCommon_56x48);
dialog_ex_set_icon(dialog_ex, 83, 22, &I_WarningDolphinFlip_45x42);
dialog_ex_set_header(dialog_ex, "SD Card Not Mounted", 64, 3, AlignCenter, AlignTop);
dialog_ex_set_text(
dialog_ex, "Try to reinsert\nor format SD\ncard.", 3, 19, AlignLeft, AlignTop);
@@ -42,7 +42,7 @@ void storage_settings_scene_unmounted_on_enter(void* context) {
}
dialog_ex_set_center_button_text(dialog_ex, "OK");
dialog_ex_set_icon(dialog_ex, 72, 17, &I_DolphinCommon_56x48);
dialog_ex_set_icon(dialog_ex, 83, 22, &I_WarningDolphinFlip_45x42);
dialog_ex_set_context(dialog_ex, app);
dialog_ex_set_result_callback(dialog_ex, storage_settings_scene_unmounted_dialog_callback);
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 901 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 930 B

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 990 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 994 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@@ -0,0 +1 @@
6
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Some files were not shown because too many files have changed in this diff Show More