aboutsummaryrefslogtreecommitdiff
path: root/simplemotion.c
diff options
context:
space:
mode:
authorTero Kontkanen <tero.k@granitedevices.fi>2016-12-29 18:36:22 +0200
committerTero Kontkanen <tero.k@granitedevices.fi>2016-12-29 18:49:47 +0200
commit6ce53fb1222a91d3e709e4a604a44a8ca33bc00c (patch)
treea6d28e08fb9595c4158a83a91e41fb1dea0a02a0 /simplemotion.c
parent1f976e7371a1da4d2b7d3e33587f6c03c33c9eed (diff)
downloadSimpleMotionV2-6ce53fb1222a91d3e709e4a604a44a8ca33bc00c.tar.gz
SimpleMotionV2-6ce53fb1222a91d3e709e4a604a44a8ca33bc00c.zip
Replaced RS232 library by customized code, not tested yet (win or linux)
Diffstat (limited to 'simplemotion.c')
-rw-r--r--simplemotion.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/simplemotion.c b/simplemotion.c
index ea773ac..cdee1d1 100644
--- a/simplemotion.c
+++ b/simplemotion.c
@@ -92,7 +92,10 @@ void smDebug( smbus handle, smVerbosityLevel verbositylevel, char *format, ...)
va_start(fmtargs,format);
vsnprintf(buffer,sizeof(buffer)-1,format,fmtargs);
va_end(fmtargs);
- fprintf(smDebugOut,"%s: %s",smBus[handle].busDeviceName, buffer);
+ if(handle>=0)
+ fprintf(smDebugOut,"%s: %s",smBus[handle].busDeviceName, buffer);
+ else
+ fprintf(smDebugOut,"SMLib: %s",buffer);//no handle given
}
}
#else