Renamed two members in Application class for better understandability
This commit is contained in:
parent
d2adff88d6
commit
7ffe69927f
2 changed files with 7 additions and 7 deletions
|
@ -71,13 +71,13 @@ void Application::Loop()
|
||||||
}
|
}
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
if(m_received && m_transmitted) {
|
if(m_lineReceived && m_transmissionCompleted) {
|
||||||
m_transmitted = false;
|
m_transmissionCompleted = false;
|
||||||
const char *line = const_cast<const char*>(m_rcvdBuffer->buffer);
|
const char *line = const_cast<const char*>(m_rcvdBuffer->buffer);
|
||||||
m_console.SendLine(line, m_rcvdBuffer->len);
|
m_console.SendLine(line, m_rcvdBuffer->len);
|
||||||
lcd.Print(line);
|
lcd.Print(line);
|
||||||
lcd.Print("\r\n", 2);
|
lcd.Print("\r\n", 2);
|
||||||
m_received = false;
|
m_lineReceived = false;
|
||||||
m_rcvdBuffer->busy = false;
|
m_rcvdBuffer->busy = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,12 +101,12 @@ void Application::Loop()
|
||||||
|
|
||||||
void Application::LineReceived(void *userParam, SerialConsole<257>::Buffer *buffer)
|
void Application::LineReceived(void *userParam, SerialConsole<257>::Buffer *buffer)
|
||||||
{
|
{
|
||||||
m_received = true;
|
m_lineReceived = true;
|
||||||
m_rcvdBuffer = buffer;
|
m_rcvdBuffer = buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::TransmissionComplete(void *userParam, SerialConsole<257>::Buffer *buffer)
|
void Application::TransmissionComplete(void *userParam, SerialConsole<257>::Buffer *buffer)
|
||||||
{
|
{
|
||||||
m_transmitted = true;
|
m_transmissionCompleted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,10 +38,10 @@ private:
|
||||||
virtual void TransmissionComplete(void *userParam, SerialConsole<257>::Buffer *buffer);
|
virtual void TransmissionComplete(void *userParam, SerialConsole<257>::Buffer *buffer);
|
||||||
|
|
||||||
SerialConsole<257> m_console;
|
SerialConsole<257> m_console;
|
||||||
volatile bool m_received = false;
|
volatile bool m_lineReceived = false;
|
||||||
volatile SerialConsole<257>::Buffer *m_rcvdBuffer;
|
volatile SerialConsole<257>::Buffer *m_rcvdBuffer;
|
||||||
|
|
||||||
volatile bool m_transmitted = true;
|
volatile bool m_transmissionCompleted = true;
|
||||||
};
|
};
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue