aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
l---------[-rw-r--r--]README43
-rw-r--r--src/optmanager.cpp12
-rw-r--r--src/ultimate.cpp15
-rw-r--r--src/ultimate.hpp2
4 files changed, 18 insertions, 54 deletions
diff --git a/README b/README
index ed32977..42061c0 100644..120000
--- a/README
+++ b/README
@@ -1,42 +1 @@
-README for AeroUp 0.2
-=====================
-
-
-AeroUp is an open source and multiplatform tool to use with Ultimate (programmable light sequencing juggling props) from Aerotech Projects Ltd.
-
-there is not yet support for microsoft Window, because as i working on the core part who'll become a shared lib,
-and there is no support for getoptlong for Window, as a gui is scheduled soon, i don't bother me.
-
-
-Features
-========
-* Start command
-* Test command
-* Color command
-* Get Serial Number command
-* Set Serial Number command
-* Upload glo sequences command
-* checks syntax of .glo files
-
-multithread, multiplatform gui, and some others original features coming soon...
-
-
-Installation
-============
-./configure
-sudo make install
-if you have boost library it will use it.
-but it should not be a problem if you don't have it.
-
-Documentation
-=============
-man aeroup
-or look at the man folder.
-
-Links
-=====
-* Github page : https://github.com/LaurentBa/AeroUp
-* http://www.aerotechprojects.com/index.htm
-
-note : there will be no support for microsoft Window before version 1
-
+README.md \ No newline at end of file
diff --git a/src/optmanager.cpp b/src/optmanager.cpp
index a8cc039..9ea843f 100644
--- a/src/optmanager.cpp
+++ b/src/optmanager.cpp
@@ -184,8 +184,16 @@ OptManager::sendGetSerial( std::string port_name)
void
OptManager::sendSetSerial(uint32_t i_serialNumber, string port)
{
+ uint32_t ser_nb;
Ultimate prop(port);
- prop.setSerialUlt( i_serialNumber);
+ ser_nb = prop.setSerialUlt( i_serialNumber);
+
+ if (VERBOSE_AERO)
+ {
+ cout << "Serial number 0x" << hex << ser_nb
+ << " sent" << endl;
+ }
+
}
/*
@@ -394,13 +402,11 @@ OptManager::isValidSerialNumber(string strNb)
{
std::stringstream ss( strNb);
ss >> dec >> i_ser_nb;
- cout << i_ser_nb << endl;
}
else if(isHexNotation( strNb))
{
std::stringstream ss( strNb.substr(2));
ss >> hex >> i_ser_nb;
- cout << i_ser_nb << endl;
}
else
{
diff --git a/src/ultimate.cpp b/src/ultimate.cpp
index 5efa0f9..63df51e 100644
--- a/src/ultimate.cpp
+++ b/src/ultimate.cpp
@@ -32,6 +32,8 @@
#include <stdlib.h>
#include "ultimate.hpp"
+extern bool VERBOSE_AERO;
+
using namespace std;
Ultimate::Ultimate ( string serial_name ):
@@ -115,23 +117,20 @@ Ultimate::uploadGlo ( string fileName)
* Method: Ultimate :: setSerialUlt
* Description:
*/
- void
+ uint32_t
Ultimate::setSerialUlt(uint32_t serialNumber)
{
- cout << serialNumber << endl;
uint8_t ser_nb[6] = {83,0,0,0,0,0};
ser_nb[4] = (uint8_t)((serialNumber & 0xff000000UL) >> 24);
ser_nb[3] = (uint8_t)((serialNumber & 0x00ff0000UL) >> 16);
ser_nb[2] = (uint8_t)((serialNumber & 0x0000ff00UL) >> 8);
ser_nb[1] = (uint8_t)((serialNumber & 0x000000ffUL) );
-
- for (int i = 0; i < 6; i++)
- {
- cout << (int)ser_nb[i] << endl;
- }
+
ser.serialNumber(ser_nb) ;
- exit (EXIT_FAILURE);
+ return serialNumber;
+
+ //exit (EXIT_FAILURE);
}
diff --git a/src/ultimate.hpp b/src/ultimate.hpp
index 0375781..355bd14 100644
--- a/src/ultimate.hpp
+++ b/src/ultimate.hpp
@@ -56,7 +56,7 @@ class Ultimate
std::string getSerial();
int uploadGlo(std::string file_name);
int uploadGloc(std::string file_name);
- void setSerialUlt(uint32_t serialNumber);
+ uint32_t setSerialUlt(uint32_t serialNumber);
private:
SerialProp ser;