mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 04:34:43 +04:00
[FL-3925] JS views finished (#4155)
* js: value destructuring and tests * js: temporary fix to see size impact * js_val: reduce code size 1 * i may be stupid. * test: js_value args * Revert "js: temporary fix to see size impact" This reverts commit f51d726dbafc4300d3552020de1c3b8f9ecd3ac1. * pvs: silence warnings * style: formatting * pvs: silence warnings? * pvs: silence warnings?? * js_value: redesign declaration types for less code * js: temporary fix to see size impact * style: formatting * pvs: fix helpful warnings * js_value: reduce .rodata size * pvs: fix helpful warning * js_value: reduce code size 1 * fix build error * style: format * Revert "js: temporary fix to see size impact" This reverts commit d6a46f01794132e882e03fd273dec24386a4f8ba. * style: format * js: move to new arg parser * style: format * feat: all js views done * js, toolbox: generalize string owning * toolbox: silence pvs warning --------- Co-authored-by: hedger <hedger@nanode.su> Co-authored-by: hedger <hedger@users.noreply.github.com>
This commit is contained in:
@@ -93,13 +93,12 @@ static bool popup_view_input_callback(InputEvent* event, void* context) {
|
||||
void popup_start_timer(void* context) {
|
||||
Popup* popup = context;
|
||||
if(popup->timer_enabled) {
|
||||
uint32_t timer_period =
|
||||
popup->timer_period_in_ms / (1000.0f / furi_kernel_get_tick_frequency());
|
||||
uint32_t timer_period = furi_ms_to_ticks(popup->timer_period_in_ms);
|
||||
if(timer_period == 0) timer_period = 1;
|
||||
|
||||
if(furi_timer_start(popup->timer, timer_period) != FuriStatusOk) {
|
||||
furi_crash();
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ void popup_free(Popup* popup);
|
||||
*/
|
||||
View* popup_get_view(Popup* popup);
|
||||
|
||||
/** Set popup header text
|
||||
/** Set popup timeout callback
|
||||
*
|
||||
* @param popup Popup instance
|
||||
* @param callback PopupCallback
|
||||
|
||||
Reference in New Issue
Block a user