From 6ce53fb1222a91d3e709e4a604a44a8ca33bc00c Mon Sep 17 00:00:00 2001 From: Tero Kontkanen Date: Thu, 29 Dec 2016 18:36:22 +0200 Subject: Replaced RS232 library by customized code, not tested yet (win or linux) --- simplemotion.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'simplemotion.c') 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 -- cgit v1.2.3