mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-16 00:18:11 -07:00
Fix issues with external module 5v power
This commit is contained in:
@@ -674,6 +674,9 @@ int32_t playlist_app(void* p) {
|
||||
|
||||
furi_hal_power_suppress_charge_enter();
|
||||
|
||||
// Enable power for External CC1101 if it is connected
|
||||
furi_hal_subghz_enable_ext_power();
|
||||
|
||||
// select playlist file
|
||||
{
|
||||
DialogsApp* dialogs = furi_record_open(RECORD_DIALOGS);
|
||||
@@ -752,6 +755,8 @@ int32_t playlist_app(void* p) {
|
||||
exit_cleanup:
|
||||
|
||||
furi_hal_power_suppress_charge_exit();
|
||||
// Disable power for External CC1101 if it was enabled and module is connected
|
||||
furi_hal_subghz_disable_ext_power();
|
||||
|
||||
if(app->worker != NULL) {
|
||||
if(playlist_worker_running(app->worker)) {
|
||||
|
||||
@@ -124,6 +124,9 @@ POCSAGPagerApp* pocsag_pager_app_alloc() {
|
||||
|
||||
furi_hal_power_suppress_charge_enter();
|
||||
|
||||
// Enable power for External CC1101 if it is connected
|
||||
furi_hal_subghz_enable_ext_power();
|
||||
|
||||
scene_manager_next_scene(app->scene_manager, POCSAGPagerSceneStart);
|
||||
|
||||
return app;
|
||||
@@ -135,6 +138,9 @@ void pocsag_pager_app_free(POCSAGPagerApp* app) {
|
||||
//CC1101 off
|
||||
pcsg_sleep(app);
|
||||
|
||||
// Disable power for External CC1101 if it was enabled and module is connected
|
||||
furi_hal_subghz_disable_ext_power();
|
||||
|
||||
// Submenu
|
||||
view_dispatcher_remove_view(app->view_dispatcher, POCSAGPagerViewSubmenu);
|
||||
submenu_free(app->submenu);
|
||||
|
||||
@@ -170,6 +170,9 @@ ProtoViewApp* protoview_app_alloc() {
|
||||
furi_hal_power_suppress_charge_enter();
|
||||
app->running = 1;
|
||||
|
||||
// Enable power for External CC1101 if it is connected
|
||||
furi_hal_subghz_enable_ext_power();
|
||||
|
||||
return app;
|
||||
}
|
||||
|
||||
@@ -182,6 +185,9 @@ void protoview_app_free(ProtoViewApp* app) {
|
||||
// Put CC1101 on sleep, this also restores charging.
|
||||
radio_sleep(app);
|
||||
|
||||
// Disable power for External CC1101 if it was enabled and module is connected
|
||||
furi_hal_subghz_disable_ext_power();
|
||||
|
||||
// View related.
|
||||
view_port_enabled_set(app->view_port, false);
|
||||
gui_remove_view_port(app->gui, app->view_port);
|
||||
|
||||
@@ -392,6 +392,9 @@ void spectrum_analyzer_free(SpectrumAnalyzer* instance) {
|
||||
|
||||
furi_hal_subghz_idle();
|
||||
furi_hal_subghz_sleep();
|
||||
|
||||
// Disable power for External CC1101 if it was enabled and module is connected
|
||||
furi_hal_subghz_disable_ext_power();
|
||||
}
|
||||
|
||||
int32_t spectrum_analyzer_app(void* p) {
|
||||
@@ -402,6 +405,9 @@ int32_t spectrum_analyzer_app(void* p) {
|
||||
|
||||
furi_hal_power_suppress_charge_enter();
|
||||
|
||||
// Enable power for External CC1101 if it is connected
|
||||
furi_hal_subghz_enable_ext_power();
|
||||
|
||||
FURI_LOG_D("Spectrum", "Main Loop - Starting worker");
|
||||
furi_delay_ms(50);
|
||||
|
||||
|
||||
Submodule applications/plugins/subbrute updated: 7cdb9e1386...552bd12d0f
@@ -107,6 +107,9 @@ WeatherStationApp* weather_station_app_alloc() {
|
||||
|
||||
furi_hal_power_suppress_charge_enter();
|
||||
|
||||
// Enable power for External CC1101 if it is connected
|
||||
furi_hal_subghz_enable_ext_power();
|
||||
|
||||
scene_manager_next_scene(app->scene_manager, WeatherStationSceneStart);
|
||||
|
||||
return app;
|
||||
@@ -118,6 +121,9 @@ void weather_station_app_free(WeatherStationApp* app) {
|
||||
//CC1101 off
|
||||
ws_sleep(app);
|
||||
|
||||
// Disable power for External CC1101 if it was enabled and module is connected
|
||||
furi_hal_subghz_disable_ext_power();
|
||||
|
||||
// Submenu
|
||||
view_dispatcher_remove_view(app->view_dispatcher, WeatherStationViewSubmenu);
|
||||
submenu_free(app->submenu);
|
||||
|
||||
Reference in New Issue
Block a user