diff --git a/c_algorithms/serialMCS/Test.cpp b/c_algorithms/serialMCS/Test.cpp index ac7c24f..3f899be 100644 --- a/c_algorithms/serialMCS/Test.cpp +++ b/c_algorithms/serialMCS/Test.cpp @@ -6,7 +6,7 @@ #include // Contains file controls like O_RDWR #include // Error integer and strerror() function #include // Contains POSIX terminal control definitions -#include // write(), read(), close() +#include // write(), read(), close(), usleep() int openSerialPort() { @@ -69,14 +69,17 @@ int main() int fd = 0; fd=openSerialPort(); - char full_cmd [254]; + char full_cmd [1000]; // add ':' before and '\n' after cmd (SmarAct Command Syntax) //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"); + 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 int ret = write(fd, full_cmd, strlen(full_cmd)); - sprintf(full_cmd, ":SHE2\n"); + + usleep(100000); //0.1s +// sprintf(full_cmd, ":CS3\n"); + sprintf(full_cmd, ":FRM0,0,60000,0\n:FRM1,0,60000,0\n:FRM2,0,60000,0\n"); write(fd, full_cmd, strlen(full_cmd)); diff --git a/python_algorithms/RESTful/README.md b/python_algorithms/RESTful/README.md index 5f9445c..fd21c39 100644 --- a/python_algorithms/RESTful/README.md +++ b/python_algorithms/RESTful/README.md @@ -49,12 +49,15 @@ - `404 Not Found` if the variable does not exist - `200 OK` on success - - +```json +{ + "MODE":1 +} +``` # SETTING INFORMATION -## Setting the variables to NewGon +## Setting many variables to NewGon **Definition** `POST /status`