Bugfixes and speed improvements

This commit is contained in:
Jan Käberich 2020-09-26 23:34:31 +02:00
parent 199535450d
commit 926392e5b9
37 changed files with 873 additions and 566 deletions

View file

@ -61,6 +61,7 @@ static void HardwareWorkRequired() {
}
void App_Start() {
STM::Init();
HAL_ADCEx_Calibration_Start(&hadc1, ADC_SINGLE_ENDED);
handle = xTaskGetCurrentTaskHandle();
usb_init(communication_usb_input);
@ -162,6 +163,12 @@ void App_Start() {
SA::Setup(packet.spectrumSettings);
Communication::SendWithoutPayload(Protocol::PacketType::Ack);
break;
case Protocol::PacketType::RequestDeviceLimits:
Protocol::PacketInfo p;
p.type = Protocol::PacketType::DeviceLimits;
p.limits = HW::Limits;
Communication::Send(p);
break;
#ifdef HAS_FLASH
case Protocol::PacketType::ClearFlash:
HW::SetMode(HW::Mode::Idle);