Wrap up/refactor the current code into a format that's easy for any external firmware developer to utilize.
E.g.:
(you don't have to use these class names if you'd like to use something else)
// In someone's code embedded in their controller:
PanoramaPacket mypacket;
PanoramaCommand mycommand;
PanoramaServer server = new();
server.init();
server.config(
// configs, settings, etc. that can be modified by developers
);
server.start();
// main controller loop
while (1) {
// sending of data
mypacket.data = 1.2345;
mypacket.sensorname = 'motor';
mypacket.time = current_time;
server.send_packet(mypacket);
// receiving command from client-side
server.try_get_command(&mycommand); // non-blocking check for command
if (mycommand.command == 'stop') {
// do stop routine
}
}
Please develop this by having the package files in its own directory, and use it by #include-ing it in your main.cpp firmware file (this also acts as an example of how to use our package library'
Wrap up/refactor the current code into a format that's easy for any external firmware developer to utilize.
E.g.:
(you don't have to use these class names if you'd like to use something else)
Please develop this by having the package files in its own directory, and use it by
#include-ing it in your main.cpp firmware file (this also acts as an example of how to use our package library'