diff options
| author | Tero Kontkanen <tero.kontkanen@granitedevices.fi> | 2017-01-28 19:04:49 +0200 |
|---|---|---|
| committer | Tero Kontkanen <tero.kontkanen@granitedevices.fi> | 2017-01-28 19:04:49 +0200 |
| commit | f065efc4607c8adcc31266748bd1e20ca39090b9 (patch) | |
| tree | d67d10ff71848620021b294e176b72270113fc9f /simplemotion.c | |
| parent | f629f3a69e092a9299fd0d70dddd2efa6bbee2e7 (diff) | |
| parent | dcd4a255d2d0650d054aa4fd38d35fdc71126e02 (diff) | |
| download | SimpleMotionV2-f065efc4607c8adcc31266748bd1e20ca39090b9.tar.gz SimpleMotionV2-f065efc4607c8adcc31266748bd1e20ca39090b9.zip | |
Merge branch '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
|
