mirror of
https://github.com/Binary-Coalescence/motorDSM.git
synced 2025-08-04 21:55:40 -05:00
Restore errlogPrintf in debug messages.
This commit is contained in:
@@ -31,23 +31,16 @@ extern struct driver_table MCB4B_access;
|
|||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
volatile int devMCB4BDebug = 0;
|
volatile int devMCB4BDebug = 0;
|
||||||
#define Debug(l, f, args...) { if(l<=devMCB4BDebug) printf(f,## args); }
|
#define Debug(L, FMT, V...) { if(L <= devMCB4BDebug) \
|
||||||
|
{ errlogPrintf("%s(%d):",__FILE__,__LINE__); \
|
||||||
|
errlogPrintf(FMT,##V); } }
|
||||||
#else
|
#else
|
||||||
#define Debug(l, f, args...)
|
#define Debug(L, FMT, V...)
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define Debug()
|
#define Debug()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
#ifdef NODEBUG
|
|
||||||
#define Debug(L,FMT,V) ;
|
|
||||||
#else
|
|
||||||
#define Debug(L,FMT,V...) { if(L <= devMCB4BDebug) \
|
|
||||||
{ errlogPrintf("%s(%d):",__FILE__,__LINE__); \
|
|
||||||
errlogPrintf(FMT,##V); } }
|
|
||||||
#endif
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Debugging levels:
|
/* Debugging levels:
|
||||||
* devMCB4BDebug >= 3 Print new part of command and command string so far
|
* devMCB4BDebug >= 3 Print new part of command and command string so far
|
||||||
|
@@ -33,24 +33,16 @@
|
|||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
volatile int drvMCB4BDebug = 0;
|
volatile int drvMCB4BDebug = 0;
|
||||||
#define Debug(l, f, args...) { if(l<=drvMCB4BDebug) printf(f,## args); }
|
#define Debug(L, FMT, V...) { if(L <= drvMCB4BDebug) \
|
||||||
|
{ errlogPrintf("%s(%d):",__FILE__,__LINE__); \
|
||||||
|
errlogPrintf(FMT,##V); } }
|
||||||
#else
|
#else
|
||||||
#define Debug(l, f, args...)
|
#define Debug(L, FMT, V...)
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define Debug()
|
#define Debug()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
#ifdef NODEBUG
|
|
||||||
#define Debug(L,FMT,V) ;
|
|
||||||
#else
|
|
||||||
#define Debug(L,FMT,V...) { if(L <= drvMCB4BDebug) \
|
|
||||||
{ errlogPrintf("%s(%d):",__FILE__,__LINE__); \
|
|
||||||
errlogPrintf(FMT,##V); } }
|
|
||||||
#endif
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Debugging notes:
|
/* Debugging notes:
|
||||||
* drvMCB4BDebug == 0 No debugging information is printed
|
* drvMCB4BDebug == 0 No debugging information is printed
|
||||||
* drvMCB4BDebug >= 1 Warning information is printed
|
* drvMCB4BDebug >= 1 Warning information is printed
|
||||||
@@ -60,7 +52,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
int MCB4B_num_cards = 0;
|
int MCB4B_num_cards = 0;
|
||||||
volatile int drvMCB4BDebug = 0;
|
|
||||||
|
|
||||||
/* Local data required for every driver; see "motordrvComCode.h" */
|
/* Local data required for every driver; see "motordrvComCode.h" */
|
||||||
#include "motordrvComCode.h"
|
#include "motordrvComCode.h"
|
||||||
@@ -264,7 +255,7 @@ STATIC int set_status(int card, int signal)
|
|||||||
{
|
{
|
||||||
strcpy(buff, nodeptr->postmsgptr);
|
strcpy(buff, nodeptr->postmsgptr);
|
||||||
strcat(buff, "\r");
|
strcat(buff, "\r");
|
||||||
send_mess(card, buff, NULL);
|
send_mess(card, buff, (char) NULL);
|
||||||
/* The MCB4B always sends back a response, read it and discard */
|
/* The MCB4B always sends back a response, read it and discard */
|
||||||
recv_mess(card, buff, WAIT);
|
recv_mess(card, buff, WAIT);
|
||||||
nodeptr->postmsgptr = NULL;
|
nodeptr->postmsgptr = NULL;
|
||||||
|
Reference in New Issue
Block a user