From a8b1f9d20fcd15908a2c8e28293d763b7f92623a Mon Sep 17 00:00:00 2001 From: ROS Station Date: Thu, 5 Dec 2019 14:56:49 +0100 Subject: [PATCH] started MCS.cpp --- c_algorithms/serialMCSinterface/MCS.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/c_algorithms/serialMCSinterface/MCS.cpp b/c_algorithms/serialMCSinterface/MCS.cpp index 30b4c57..9af5958 100644 --- a/c_algorithms/serialMCSinterface/MCS.cpp +++ b/c_algorithms/serialMCSinterface/MCS.cpp @@ -66,11 +66,26 @@ int openSerialPort() { int main() { + //INITIALIZATION + // * Get Serial Port ready + int fd = 0; fd=openSerialPort(); char full_cmd [1000]; // add ':' before and '\n' after cmd (SmarAct Command Syntax) + + + //MAIN LOOP + // * Check for high priority: have values changed. + // Execute these first. + // * If there's nothing in the priority queue, execute get status + + // Usally do these things during a loop: + // + + + //sprintf(full_cmd, ":GSI\n:GNC\n:FRM0,1,1,0\n"); sprintf(full_cmd, ":GSI\n:GIV\n:GNC\n:GCT0\n:GCT1\n:GCT2\n:GCT3\n:GCT4\n:GCT5\n:SHE1\n:SCM1\n"); //fcntl(fd, F_SETFL, 0); // 0 blocks the system while reading serial port