mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 21:08:36 -07:00
Update apps pt2 + Add MAYHEM Evil Portal
This commit is contained in:
@@ -105,6 +105,15 @@ void evil_portal_app_free(Evil_PortalApp* app) {
|
||||
|
||||
int32_t evil_portal_app(void* p) {
|
||||
UNUSED(p);
|
||||
|
||||
// Enable 5v on startup
|
||||
uint8_t attempts = 0;
|
||||
while(!furi_hal_power_is_otg_enabled() && attempts++ < 5) {
|
||||
furi_hal_power_enable_otg();
|
||||
furi_delay_ms(10);
|
||||
}
|
||||
furi_delay_ms(200);
|
||||
|
||||
Evil_PortalApp* evil_portal_app = evil_portal_app_alloc();
|
||||
|
||||
evil_portal_app->uart = evil_portal_uart_init(evil_portal_app);
|
||||
@@ -113,5 +122,9 @@ int32_t evil_portal_app(void* p) {
|
||||
|
||||
evil_portal_app_free(evil_portal_app);
|
||||
|
||||
if(furi_hal_power_is_otg_enabled()) {
|
||||
furi_hal_power_disable_otg();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user