The high-level goal of this project is to receive messages, display them on a screen, type messages and see a preview on the screen, and then send those messages. In our case to separate it up into three "subsystems." Each sub-system will interact with the other subsystems in a predefined way like the one I'm about to propose.
- There will be a function named
updateDisplay()
which will display the latest messages in thehistory
array. - Every time a message is received it will be fed into a function named
receivedMSG(MSG)
. This function will add the message to ahistory
array & call theupdateDisplay()
function. - A variable named
MSG_Draft
will be set & updated by the keyboard subsystem to store the message the user is currently typing. A function namedupdateDisplay()
will be called every time the draft is updated so that the display can be updated accordingly. - A function named
sendDraft()
which will:- Send the drafted message with
sendMSG(MSG)
which will send a message over LoRa - Add the message to the
history
array - Call
updateDisplay()
so the display will show the new message - Delete the contents of
MSG_Draft
- Send the drafted message with
- I (@Evan) will implement the
sendDraft()
, andreceivedMSG(MSG)
functions - @Cosmin (who is working on the display) will implement the
updateDisplay()
function which will display the contents of thehistory
array the fit on the screen & theMSG_Draft
. - @j will implement the
MSG_Draft
variable setter which will callupdateDisplay()
every time it is modified with input from the keyboard. - @Alex/@krisk will implement the
sendMSG(MSG)
function which will send the passed in text & when messages are received have them fed into thereceivedMSG(MSG)
function.
Please read all of the above! I spent 45 min writing it & it's important. If you have any questions or feel this structure could be improved for simplicity, message me on slack!