mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-30 19:29:17 +00:00
Merge pull request #984 from mc-hamster/display_speed
Make screen animations smoother (aka Scale the CPU) #983
This commit is contained in:
commit
4de89fab0d
@ -36,6 +36,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "target_specific.h"
|
#include "target_specific.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "gps/GeoCoord.h"
|
#include "gps/GeoCoord.h"
|
||||||
|
#include "sleep.h"
|
||||||
|
|
||||||
#ifndef NO_ESP32
|
#ifndef NO_ESP32
|
||||||
#include "mesh/http/WiFiAPClient.h"
|
#include "mesh/http/WiFiAPClient.h"
|
||||||
@ -875,6 +876,11 @@ int32_t Screen::runOnce()
|
|||||||
// oldFrameState = ui.getUiState()->frameState;
|
// oldFrameState = ui.getUiState()->frameState;
|
||||||
DEBUG_MSG("Setting idle framerate\n");
|
DEBUG_MSG("Setting idle framerate\n");
|
||||||
targetFramerate = IDLE_FRAMERATE;
|
targetFramerate = IDLE_FRAMERATE;
|
||||||
|
|
||||||
|
#ifndef NO_ESP32
|
||||||
|
setCPUFast(false); // Turn up the CPU to improve screen animations
|
||||||
|
#endif
|
||||||
|
|
||||||
ui.setTargetFPS(targetFramerate);
|
ui.setTargetFPS(targetFramerate);
|
||||||
forceDisplay();
|
forceDisplay();
|
||||||
}
|
}
|
||||||
@ -1074,6 +1080,11 @@ void Screen::setFastFramerate()
|
|||||||
|
|
||||||
// We are about to start a transition so speed up fps
|
// We are about to start a transition so speed up fps
|
||||||
targetFramerate = SCREEN_TRANSITION_FRAMERATE;
|
targetFramerate = SCREEN_TRANSITION_FRAMERATE;
|
||||||
|
|
||||||
|
#ifndef NO_ESP32
|
||||||
|
setCPUFast(true); // Turn up the CPU to improve screen animations
|
||||||
|
#endif
|
||||||
|
|
||||||
ui.setTargetFPS(targetFramerate);
|
ui.setTargetFPS(targetFramerate);
|
||||||
setInterval(0); // redraw ASAP
|
setInterval(0); // redraw ASAP
|
||||||
runASAP = true;
|
runASAP = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user