Fixed setting of battery voltage and transmission of PTT press signal from linux emulator shell
This commit is contained in:
parent
5c94d33b6b
commit
c966f82352
|
|
@ -24,8 +24,6 @@
|
|||
#include <emulator/sdl_engine.h>
|
||||
#endif
|
||||
|
||||
extern void *ui_task(void *arg);
|
||||
|
||||
int main(void)
|
||||
{
|
||||
// MD-9600 does not have a proper power on/off mechanism and the MCU is
|
||||
|
|
|
|||
|
|
@ -300,7 +300,9 @@ void sdlEngine_init()
|
|||
SCREEN_WIDTH,
|
||||
SCREEN_HEIGHT);
|
||||
SDL_RenderClear(renderer);
|
||||
SDL_RenderPresent(renderer);
|
||||
|
||||
// Setting brightness also triggers a render
|
||||
set_brightness(state.settings.brightness);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ uint16_t platform_getVbat()
|
|||
float voltage = emulator_state.vbat;
|
||||
if(voltage < 0.0f) voltage = 0.0f;
|
||||
if(voltage > 65.0f) voltage = 65.0f;
|
||||
return ((uint16_t) voltage);
|
||||
return ((uint16_t) (voltage * 1000.0f));
|
||||
}
|
||||
|
||||
uint8_t platform_getMicLevel()
|
||||
|
|
@ -108,7 +108,7 @@ bool platform_getPttStatus()
|
|||
// Read P key status from SDL
|
||||
const uint8_t *state = SDL_GetKeyboardState(NULL);
|
||||
|
||||
if (state[SDL_SCANCODE_P])
|
||||
if ((state[SDL_SCANCODE_P] != 0) || (emulator_state.PTTstatus == true))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue