chg: Serialnumber is shorter. Will be better for OSX ppl

This commit is contained in:
iceman1001 2017-10-21 13:07:07 +02:00
commit 5da60668dc
2 changed files with 6 additions and 4 deletions

View file

@ -30,7 +30,7 @@
#if defined (_WIN32) #if defined (_WIN32)
#define SERIAL_PORT_H "com3" #define SERIAL_PORT_H "com3"
#elif defined(__APPLE__) #elif defined(__APPLE__)
#define SERIAL_PORT_H "/dev/cu.usbmodem888888" #define SERIAL_PORT_H "/dev/cu.usbmodem888"
#else #else
#define SERIAL_PORT_H "/dev/ttyACM0" #define SERIAL_PORT_H "/dev/ttyACM0"
#endif #endif
@ -109,6 +109,7 @@ static bool hookUpPM3() {
static void *uart_receiver(void *targ) { static void *uart_receiver(void *targ) {
struct receiver_arg *arg = (struct receiver_arg*)targ; struct receiver_arg *arg = (struct receiver_arg*)targ;
size_t rxlen; size_t rxlen;
bool tmpsignal;
int counter_to_offline = 0; int counter_to_offline = 0;
while (arg->run) { while (arg->run) {
@ -124,7 +125,6 @@ static void *uart_receiver(void *targ) {
} }
prx = rx; prx = rx;
bool tmpsignal;
__atomic_load(&txcmd_pending, &tmpsignal, __ATOMIC_SEQ_CST); __atomic_load(&txcmd_pending, &tmpsignal, __ATOMIC_SEQ_CST);
if ( tmpsignal ) { if ( tmpsignal ) {
bool res = uart_send(sp, (byte_t*) &txcmd, sizeof(UsbCommand)); bool res = uart_send(sp, (byte_t*) &txcmd, sizeof(UsbCommand));

View file

@ -376,9 +376,11 @@ static const char StrProduct[] = {
}; };
static const char StrSerialNumber[] = { static const char StrSerialNumber[] = {
18, // Length 8, // Length
0x03, // Type is string 0x03, // Type is string
'8',0,'8',0,'8',0,'8',0,'8',0,'8',0,'8',0,'8',0 '8',0,
'8',0,
'8',0
}; };
// size inkluderar sitt egna fält. // size inkluderar sitt egna fält.