diff options
| author | Tero Kontkanen <tero.kontkanen@granitedevices.fi> | 2017-01-27 14:10:28 +0200 |
|---|---|---|
| committer | Tero Kontkanen <tero.kontkanen@granitedevices.fi> | 2017-01-27 14:10:28 +0200 |
| commit | 787e6aa5f47c2bfa3e8f7d1d3ffb4f3c4926575a (patch) | |
| tree | 832d67329b562c1407cddebad756da53efea0cc1 /simplemotion.c | |
| parent | 1f976e7371a1da4d2b7d3e33587f6c03c33c9eed (diff) | |
| parent | b70a617475efe9af38e6d3debc26ff1555714435 (diff) | |
| download | SimpleMotionV2-787e6aa5f47c2bfa3e8f7d1d3ffb4f3c4926575a.tar.gz SimpleMotionV2-787e6aa5f47c2bfa3e8f7d1d3ffb4f3c4926575a.zip | |
Merge branch 'feature/replace_rs232_lib' into develop
Diffstat (limited to 'simplemotion.c')
| -rw-r--r-- | simplemotion.c | 5 |
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
|
