File tree Expand file tree Collapse file tree
3rd_party_adapters/Arduino
application_business_rules/serial_interface Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,12 +44,7 @@ void setCallbackForLineReception(const StringHandler &callback)
4444
4545} // namespace serial_port
4646
47- /*
48- SerialEvent occurs whenever a new data comes in the hardware serial RX. This
49- routine is run between each time loop() runs, so using delay inside loop can
50- delay response. Multiple bytes of data may be available.
51- */
52- void serialEvent ()
47+ void serial_port::readAndHandleInput ()
5348{
5449 while (Serial.available () > 0 )
5550 {
Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ typedef std::function<void(const String &)> StringHandler;
5858 */
5959void setCallbackForLineReception (const StringHandler &callback);
6060
61+ void readAndHandleInput ();
62+
6163} // namespace serial_port
6264
6365/* *
Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ void loop()
3232 static Presenter presenter (singleMenu, board::getStatusIndicators ());
3333 static ProcessHmiInputs processHmiInputs (presenter, board::getKeypad ());
3434
35+ serial_port::readAndHandleInput ();
36+
3537 for (auto task : device::tasks)
3638 {
3739 serial_port::cout << task.second .getLabel () << " : " << std::boolalpha << task.second .isRunning ()
You can’t perform that action at this time.
0 commit comments