From 62f6da4994fe9f02f8b3dad147dd083216bb2edd Mon Sep 17 00:00:00 2001 From: mirel Date: Tue, 16 Apr 2019 17:19:17 +0200 Subject: [PATCH 1/2] fix build issues on fresh systems --- clients/assetto-corsa/Makefile | 6 +- clients/assetto-corsa/ac-cli.c | 2 +- clients/cm-f1/Makefile | 6 +- clients/pcars/Makefile | 6 +- lib/extras.c | 216 +-------------------------------- lib/scn_adapter.c | 8 +- mfcserver/Makefile | 8 +- mfcserver/mfc-main-svr.c | 33 +---- mfcxtract/Makefile | 8 +- usbxtract/sw/adapter.c | 16 +-- 10 files changed, 39 insertions(+), 270 deletions(-) diff --git a/clients/assetto-corsa/Makefile b/clients/assetto-corsa/Makefile index 425773e..342f5e4 100644 --- a/clients/assetto-corsa/Makefile +++ b/clients/assetto-corsa/Makefile @@ -8,16 +8,16 @@ program_INCLUDE_DIRS := program_LIBRARY_DIRS := program_LIBRARIES := -CPPFLAGS += $(foreach includedir,$(program_INCLUDE_DIRS),-I$(includedir)) +CPPFLAGS += $(foreach includedir,$(program_INCLUDE_DIRS),-I$(includedir)) -std=c99 LDFLAGS += $(foreach librarydir,$(program_LIBRARY_DIRS),-L$(librarydir)) -LDFLAGS += $(foreach library,$(program_LIBRARIES),-l$(library)) +LDLIBS += $(foreach library,$(program_LIBRARIES),-l$(library)) .PHONY: all clean distclean all: $(program_NAME) $(program_NAME): $(program_OBJS) - $(LINK.cc) $(program_OBJS) -o $(program_NAME) + $(LINK.cc) $(program_OBJS) $(LDLIBS) -o $(program_NAME) clean: @- $(RM) $(program_NAME) diff --git a/clients/assetto-corsa/ac-cli.c b/clients/assetto-corsa/ac-cli.c index d8c5fec..9f574d8 100644 --- a/clients/assetto-corsa/ac-cli.c +++ b/clients/assetto-corsa/ac-cli.c @@ -346,7 +346,7 @@ int main (int argc, char **argv, char **envp) switch (argv[i][1]) { case 'c': //roll % - snprintf (_pp_ps4, 49, argv[i]+2); + snprintf (_pp_ps4, 49, "%s", argv[i]+2); pp_ps4 = _pp_ps4; break; //profiling params diff --git a/clients/cm-f1/Makefile b/clients/cm-f1/Makefile index ee08f69..230afa6 100644 --- a/clients/cm-f1/Makefile +++ b/clients/cm-f1/Makefile @@ -8,16 +8,16 @@ program_INCLUDE_DIRS := program_LIBRARY_DIRS := program_LIBRARIES := -CPPFLAGS += $(foreach includedir,$(program_INCLUDE_DIRS),-I$(includedir)) +CPPFLAGS += $(foreach includedir,$(program_INCLUDE_DIRS),-I$(includedir)) -std=c99 LDFLAGS += $(foreach librarydir,$(program_LIBRARY_DIRS),-L$(librarydir)) -LDFLAGS += $(foreach library,$(program_LIBRARIES),-l$(library)) +LDLIBS += $(foreach library,$(program_LIBRARIES),-l$(library)) .PHONY: all clean distclean all: $(program_NAME) $(program_NAME): $(program_OBJS) - $(LINK.cc) $(program_OBJS) -o $(program_NAME) + $(LINK.cc) $(program_OBJS) $(LDLIBS) -o $(program_NAME) clean: @- $(RM) $(program_NAME) diff --git a/clients/pcars/Makefile b/clients/pcars/Makefile index 63a8dce..c73e070 100644 --- a/clients/pcars/Makefile +++ b/clients/pcars/Makefile @@ -8,16 +8,16 @@ program_INCLUDE_DIRS := program_LIBRARY_DIRS := program_LIBRARIES := -CPPFLAGS += $(foreach includedir,$(program_INCLUDE_DIRS),-I$(includedir)) +CPPFLAGS += $(foreach includedir,$(program_INCLUDE_DIRS),-I$(includedir)) -std=c99 LDFLAGS += $(foreach librarydir,$(program_LIBRARY_DIRS),-L$(librarydir)) -LDFLAGS += $(foreach library,$(program_LIBRARIES),-l$(library)) +LDLIBS += $(foreach library,$(program_LIBRARIES),-l$(library)) .PHONY: all clean distclean all: $(program_NAME) $(program_NAME): $(program_OBJS) - $(LINK.cc) $(program_OBJS) -o $(program_NAME) + $(LINK.cc) $(program_OBJS) $(LDLIBS) -o $(program_NAME) clean: @- $(RM) $(program_NAME) diff --git a/lib/extras.c b/lib/extras.c index 0eb9236..a78347f 100644 --- a/lib/extras.c +++ b/lib/extras.c @@ -280,56 +280,9 @@ void mfc_bcast_close () mfc_bcast_sock = -1; } - //x-sim 2.x and 3.x -// Memory map of buffer sent via network -// -// integer function -// 0-6 Joystick axis -// 7-166 40 data of Yoda 4 Bytes per value: 1=active 2=data 3=play 4=type -// 87-166 20 data of plugin 4 bytes per value: 1=1 2=data 3=1 4=99 -// 7-166 40 overwrite positions for force injector / only if needed -// 167-174 8 integer with joy button value -// 175 autostart trigger -// 176-218 43 extended gauge data (only x-sim 2 and up) -//This means integer 175, is far I know it may be inverted? -//This is a inrace detection, there maybe a difference to the ingame time. -//A integer has 4 bytes. Some my be used multible. -//There maybe a change that enlarge the packet in one of the next versions but will not change the front area -typedef struct sEvtPacket { - int joystick[7]; - int plugin[40][4]; //might need additional byte from auxdata - //int yoda[40]; //might need additional byte from auxdata - //int plugin[20]; //might need additional byte from auxdata - //int forceinjector[40]; - // - //int auxdata[60]; - // - int joybutton[8]; - int autostart; - int gaugedata[43]; - // - int padding[1]; -} SEvtPacket; - -typedef enum eGaugeData -{ - gSpeed = 0, - gRpm, - gFuel, - gFuelTemp, - gGear, - gLapNumber, - gBestLapTime, - gLastLapTime, - gPosition, - gWaterTemp, - gFlags, - gTimeStamp -} EGaugeData; int bcast_sock = -1; struct sockaddr_in si_other; -SEvtPacket pkt = {0}; void bcast_prep (char *dst) { //sockets @@ -375,11 +328,9 @@ void bcast_prep (char *dst) } #endif bcast_sock = s; - pkt.gaugedata[gFlags] = -1; - pkt.gaugedata[gGear] = 0; - pkt.gaugedata[gRpm] = -1; } +#if 0 void bcast_send () { #if 1 @@ -391,6 +342,7 @@ void bcast_send () // printf ("%d .pkt %d sent\n", pkt.gaugedata[gTimeStamp], pktk); #endif } +#endif void bcast_close () { @@ -398,170 +350,6 @@ void bcast_close () close (bcast_sock); } -/* - * serial led control - */ -int _maxg = 6; - -int opt_gear_max (int g) -{ - static int mlg = 0; - char cg = 0; - if (g == 0 && mlg == -1) - { - _maxg--; - cg++; - } - if (g == 0 && mlg == 1) - { - _maxg++; - cg++; - } - mlg = g; - return cg; -} - -void s7led_gear_max (int g) -{ - if (opt_gear_max (g)) - { - char cgear[5]; - snprintf (cgear, 4, "m%2d", _maxg); - s7ledS_send (cgear); - // - bcast_send (); - } -} - -static int opt_gear (int g); -void s7led_gear (int g) -{ - char cgear[15] = {0x79, 3, }; - switch (opt_gear_get()) - { - case 0: - snprintf (cgear+2, 4, "n"); - break; - case -1: - snprintf (cgear+2, 4, "r"); - break; - default: - snprintf (cgear+2, 4, "%1d", opt_gear_get()); - } - s7ledS_sendCmd (cgear, 3); - //s7ledS_send (cgear); -} - -static int opt_gear (int g) -{ - static int mgear = 0; - static int lg = 0; - char cg = 0; - if (g == 0 && lg == -1) - { - if (mgear > -1) - mgear--; - cg++; - } - if (g == 0 && lg == 1) - { - if (mgear < _maxg) - mgear++; - cg++; - } - lg = g; - if (cg) - { - pkt.gaugedata[gGear] = mgear; - s7led_gear (mgear); - } - return cg; -} - -int opt_gear_get () -{ - return pkt.gaugedata[gGear]; -} - -int opt_gear_max_get () -{ - return _maxg; -} - -int opt_rpm_set (int rpm) -{ - char rc = 0; - if (pkt.gaugedata[gRpm] != rpm) - rc ++; - pkt.gaugedata[gRpm] = rpm; - if (rc) - { - switch (rpm) - { - default: - s7ledS_send (" "); - break; - case 1: - s7ledS_send ("__"); - break; - case 2: - s7ledS_send ("o "); - break; - case 3: - s7ledS_send ("oo"); - break; - case 4: - s7ledS_send ("Oo"); - break; - case 5: - s7ledS_send ("OO"); - break; - } - bcast_send (); - } - //printf ("\n#RPM %d", pkt.gaugedata[gRpm]); - return rpm; -} - -int opt_rpm_get () -{ - return pkt.gaugedata[gRpm]; -} - -int opt_gear_up () -{ - return opt_gear (1); - //printf ("\n#gear UP"); -} - -int opt_gear_dn () -{ - return opt_gear (-1); - //printf ("\n#gear DN"); -} - -int opt_gear_ready () -{ - opt_gear (0); - bcast_send (); - return 1; -} - -int opt_gear_max_up () -{ - return opt_gear_max (1); -} - -int opt_gear_max_dn () -{ - return opt_gear_max (-1); -} - -int opt_gear_max_ready () -{ - return opt_gear_max (0); -} - long get_map (long x, long in_min, long in_max, long out_min, long out_max) { return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; diff --git a/lib/scn_adapter.c b/lib/scn_adapter.c index 668f959..5cb3769 100644 --- a/lib/scn_adapter.c +++ b/lib/scn_adapter.c @@ -263,8 +263,8 @@ int scn_get_crc (char *pl) */ int hex2int (char *hex) { - int val = 0; - for (int i = 0; i < 8; i++) { + int val = 0, i; + for (i = 0; i < 8; i++) { // get current character then increment char byte = *hex++; // transform hex character to the 4bit equivalent number, using the ascii table indexes @@ -284,8 +284,8 @@ int hex2int (char *hex) */ int hex2byte (char *hex) { - int val = 0; - for (int i = 0; i < 2; i++) { + int val = 0, i; + for (i = 0; i < 2; i++) { // get current character then increment char byte = *hex++; // transform hex character to the 4bit equivalent number, using the ascii table indexes diff --git a/mfcserver/Makefile b/mfcserver/Makefile index b61b3b4..ea867b7 100644 --- a/mfcserver/Makefile +++ b/mfcserver/Makefile @@ -6,18 +6,18 @@ program_CXX_OBJS := ${program_CXX_SRCS:.cpp=.o} program_OBJS := $(program_C_OBJS) $(program_CXX_OBJS) program_INCLUDE_DIRS := ../lib program_LIBRARY_DIRS := ../lib -program_LIBRARIES :=usb-1.0 curl +program_LIBRARIES :=usb-1.0 -CPPFLAGS += $(foreach includedir,$(program_INCLUDE_DIRS),-I$(includedir)) -Wall +CPPFLAGS += $(foreach includedir,$(program_INCLUDE_DIRS),-I$(includedir)) -Wall -std=c99 LDFLAGS += $(foreach librarydir,$(program_LIBRARY_DIRS),-L$(librarydir)) -LDFLAGS += $(foreach library,$(program_LIBRARIES),-l$(library)) +LDLIBS += $(foreach library,$(program_LIBRARIES),-l$(library)) .PHONY: all clean distclean all: $(program_NAME) $(program_NAME): $(program_OBJS) - $(LINK.cc) $(program_OBJS) -o $(program_NAME) + $(LINK.cc) $(program_OBJS) $(LDLIBS) -o $(program_NAME) clean: @- $(RM) $(program_NAME) diff --git a/mfcserver/mfc-main-svr.c b/mfcserver/mfc-main-svr.c index 4e258de..6d2192f 100644 --- a/mfcserver/mfc-main-svr.c +++ b/mfcserver/mfc-main-svr.c @@ -3,32 +3,6 @@ License: GPLv3 */ -/* Linux - * - * build: -gcc -o /opt/server-mfc mfc-main-svr.c shared/scn_adapter.c shared/extras.c -lusb-1.0 -std=c11 - -gcc -o /opt/server-mfc mfc-main-svr.c -DBKEY=`cat /sys/block/mmcblk0/device/serial` -DBUSR=\"`whoami`\" shared/scn_adapter.c shared/extras.c -lusb-1.0 -std=c11 -lpigpio - -gcc -o /opt/server-mfc mfc-main-svr.c -DBKEYE -DBKEY=`cat /sys/block/mmcblk0/device/serial` -DBUSR=\"`whoami`\" shared/scn_adapter.c shared/extras.c shared/smtp-ssl.c -lcurl -lusb-1.0 -std=c11 -lpigpio - -gcc -o /opt/server-mfc mfc-main-svr.c -DBKEY=0xdeadbeef -DBUSR=\"`whoami`\" shared/scn_adapter.c shared/extras.c shared/smtp-ssl.c -lcurl -lusb-1.0 -std=c11 - -gcc -o /opt/server-mfc mfc-main-svr.c shared/scn_adapter.c shared/extras.c shared/smtp-ssl.c -lcurl -lusb-1.0 -std=c11 - -#CFLAGS += -DBKEY=0xdeadbeef -DBUSR=\"prosimu\" -std=c11 -#CFLAGS += -DBKEY=0xb79837f0 -DBUSR=\"MLA\" -std=c11 - -#make sticky for user exec as root -chmod u+s mfc-main - -#make link for system wide access -ln -s mfc-main /usr/local/sbin/mfc-main - - * - * */ -#define _POSIX_C_SOURCE 199309L - #include #include #include @@ -50,8 +24,10 @@ ln -s mfc-main /usr/local/sbin/mfc-main #include #include +#ifdef _USE_PIGPIO_ //for demo platform control #include +#endif //our own #include "scn_adapter.h" #include "extras.h" @@ -107,11 +83,13 @@ int fd; //int mfc_emufd = -1; int mfc_motfd = -1; int mfc_svrfd = -1; +#ifdef _USE_PIGPIO_ //gpio demo platform #define PGPIO_L 17 //rpi pin 11 - left servo #define PGPIO_R 27 //rpi pin 13 - right servo int mfc_gpiop = 1; int gpio_demo_on = 1; +#endif //int mfc_whlfd = -1; //int mfc_joyfd = -1; /* @@ -1250,7 +1228,8 @@ int main (int argc, char **argv) // if (_odbg > 3) { - for (int i = 0; i < pktl; i++) + int i; + for (i = 0; i < pktl; i++) printf (", %d", pkt[i]); } if (pkt[0] == PKTT_DATA) diff --git a/mfcxtract/Makefile b/mfcxtract/Makefile index e74c178..64edd7f 100644 --- a/mfcxtract/Makefile +++ b/mfcxtract/Makefile @@ -6,18 +6,18 @@ program_CXX_OBJS := ${program_CXX_SRCS:.cpp=.o} program_OBJS := $(program_C_OBJS) $(program_CXX_OBJS) program_INCLUDE_DIRS := ../lib ../usbxtract/include/ program_LIBRARY_DIRS := ../lib -program_LIBRARIES :=usb-1.0 curl +program_LIBRARIES :=usb-1.0 -CPPFLAGS += $(foreach includedir,$(program_INCLUDE_DIRS),-I$(includedir)) -Wall +CPPFLAGS += $(foreach includedir,$(program_INCLUDE_DIRS),-I$(includedir)) -Wall -std=c99 LDFLAGS += $(foreach librarydir,$(program_LIBRARY_DIRS),-L$(librarydir)) -LDFLAGS += $(foreach library,$(program_LIBRARIES),-l$(library)) +LDLIBS += $(foreach library,$(program_LIBRARIES),-l$(library)) .PHONY: all clean distclean all: $(program_NAME) $(program_NAME): $(program_OBJS) - $(LINK.cc) $(program_OBJS) -o $(program_NAME) + $(LINK.cc) $(program_OBJS) $(LDLIBS) -o $(program_NAME) clean: @- $(RM) $(program_NAME) diff --git a/usbxtract/sw/adapter.c b/usbxtract/sw/adapter.c index d7c98d1..7f3a69d 100644 --- a/usbxtract/sw/adapter.c +++ b/usbxtract/sw/adapter.c @@ -54,7 +54,7 @@ static int client_init () int s = -1; //open capture file if (adapterDbg == 0x20) - cfile = open ("/tmp/usbx.cap", O_WRONLY | O_CREAT | O_TRUNC); + cfile = open ("/tmp/usbx.cap", O_WRONLY | O_CREAT | O_TRUNC, 666); if ((s = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) { printf ("\n#ERR:socket"); @@ -110,8 +110,9 @@ static int client_send (s_packet *packet) // if (0 && packet->header.length > 60) { + int i; printf ("\n#PKT:%03d bytes, type %x\n##", packet->header.length, packet->header.type); - for (int i = 0; i < packet->header.length; i++) + for (i = 0; i < packet->header.length; i++) printf ("%02x ", packet->value[i]); fflush (stdout); } @@ -123,9 +124,9 @@ static int client_send (s_packet *packet) if (cfile > 0) { //write debug - write (cfile, (const void *)&dpkt, dpkt.header.length + 2); + bs = write (cfile, (const void *)&dpkt, dpkt.header.length + 2); //write USB data - write (cfile, (const void *)packet, packet->header.length + 2); + bs = write (cfile, (const void *)packet, packet->header.length + 2); } // switch (packet->header.type) @@ -137,7 +138,7 @@ static int client_send (s_packet *packet) { if (adapterDbg) //write debug pkt first - (void)sendto (csock, (const void *)&dpkt, dpkt.header.length + 2, 0, (struct sockaddr*)&mfc_si_other, sizeof (mfc_si_other)); + bs = sendto (csock, (const void *)&dpkt, dpkt.header.length + 2, 0, (struct sockaddr*)&mfc_si_other, sizeof (mfc_si_other)); //write USB data bs = sendto (csock, (const void *)packet, packet->header.length + 2, 0, (struct sockaddr*)&mfc_si_other, sizeof (mfc_si_other)); } @@ -154,8 +155,9 @@ static int client_send (s_packet *packet) } if (0 && packet->header.length) { + int i; printf ("\n#i:CTL %03d bytes, type %x\n##", packet->header.length, packet->header.type); - for (int i = 0; i < packet->header.length; i++) + for (i = 0; i < packet->header.length; i++) printf ("%02x ", packet->value[i]); } break; @@ -184,7 +186,7 @@ void adapter_init(void) { char adapter_debug (char dbg) { char ret = adapterDbg; - if (dbg != 0xff) + if (dbg > 0) adapterDbg = dbg; return ret; } From d772a223a6bb1ccb64135006909579b3d7195bab Mon Sep 17 00:00:00 2001 From: mirel Date: Tue, 16 Apr 2019 17:22:15 +0200 Subject: [PATCH 2/2] remove forced debug info --- mfcserver/mfc-main-svr.c | 5 ++--- mfcxtract/mfc-xtract.c | 16 ++++++++-------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/mfcserver/mfc-main-svr.c b/mfcserver/mfc-main-svr.c index 6d2192f..8bbd2a2 100644 --- a/mfcserver/mfc-main-svr.c +++ b/mfcserver/mfc-main-svr.c @@ -1149,7 +1149,6 @@ int main (int argc, char **argv) { if(fds[i].revents & POLLIN || fds[i].revents & POLLPRI || fds[i].revents & POLLOUT || fds[i].revents & POLLHUP) { - //if (1||/*mtime < 2 || */(rtime % 100) == 0) if ((rkntr % 500) == 0) printf ("\n#i:poll %dfds:%s:%d@%lums/%lusec, %d/%d pkts(evt/drop)", (int)poll_i, fds[i].revents & POLLIN?"in":"out", fds[i].fd, mtime, rtime / 1000, rkntr, rkdrop); @@ -1272,11 +1271,11 @@ int main (int argc, char **argv) else { rkdrop++; - if (1||_odbg > 1) + if (_odbg > 1) { printf ("\n#w@%04d:drop early pkt %d type 0x%02x", mms, rkdrop, pkt[MFC_PIDOF]); int *_cpkt = pkt; - if (1||_odbg > 2) + if (_odbg > 2) printf ("\n#w.roll:% 6d (r: % 5d / s: % 5d) | pitch: % 6d \t(p: % 5d / s: % 5d / h: % 5d)", _cpkt[MFC_PIROLL] + _cpkt[MFC_PISWAY], _cpkt[MFC_PIROLL], _cpkt[MFC_PISWAY], _cpkt[MFC_PIPITCH] + _cpkt[MFC_PISURGE] + _cpkt[MFC_PIHEAVE], diff --git a/mfcxtract/mfc-xtract.c b/mfcxtract/mfc-xtract.c index 05416d5..6c0b68a 100644 --- a/mfcxtract/mfc-xtract.c +++ b/mfcxtract/mfc-xtract.c @@ -677,7 +677,7 @@ Heave means the acceleration up and down [g] //dof2l = pdata[MFC_PIPITCH] + pdata[MFC_PISURGE] + pdata[MFC_PIHEAVE] + pdata[MFC_PIROLL] + pdata[MFC_PISWAY]; //dof2r = pdata[MFC_PIPITCH] + pdata[MFC_PISURGE] + pdata[MFC_PIHEAVE] - pdata[MFC_PIROLL] - pdata[MFC_PISWAY]; // - if (1||_odbg) + if (_odbg) printf ("\n#i@%04lu.roll:% 6d (r: % 5d / s: % 5d) | pitch: % 6d \t(p: % 5d / s: % 5d / h: % 5d)", mdt, _cpkt[MFC_PIROLL] + _cpkt[MFC_PISWAY], _cpkt[MFC_PIROLL], _cpkt[MFC_PISWAY], _cpkt[MFC_PIPITCH] + _cpkt[MFC_PISURGE] + _cpkt[MFC_PIHEAVE], @@ -710,7 +710,7 @@ int motion_process_dummy (char *report, int rlen, unsigned long dtime) { //unhandled _wd = 'U'; - if (1 || _odbg) + if (_odbg) { printf ("\n#w!FFB@%04lu: ", dtime); for (int i = 0; i < rlen; i++) @@ -726,7 +726,7 @@ int motion_process_dummy (char *report, int rlen, unsigned long dtime) { //unhandled _wd = 'W'; - if (1 || _odbg) + if (_odbg) { printf ("\n#w!WHL@%04lu: ", dtime); for (int i = 0; i < rlen; i++) @@ -863,7 +863,7 @@ int motion_process_logitech (char *report, int rlen, unsigned long dtime) _wd = 'U'; } else - if (1 || _odbg) + if (_odbg) { _wd = 'U'; printf ("\n#w!FFB@%04lu: ", dtime); @@ -880,7 +880,7 @@ int motion_process_logitech (char *report, int rlen, unsigned long dtime) { //unhandled _wd = 'U'; - if (1||_odbg) + if (_odbg) { printf ("\n#i.WHL@%04lu: ", dtime); for (int i = 0; i < rlen; i++) @@ -897,7 +897,7 @@ int motion_process_logitech (char *report, int rlen, unsigned long dtime) lpbrk = normal_brake (get_short (report, 50), 0x0ffff); //lhbrk = normal_brake (get_short (report, 54), 0x0ffff); //handbrake // - if (1 || _odbg > 2) + if (_odbg > 2) printf ("\n#RAW whl %d acc %d brk %d", pw_roll, lpacc, lpbrk); // if (lpbrk < -5) @@ -1409,7 +1409,7 @@ FFB@002ms: 0002 01 ee 40 3d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0 { //unhandled _wd = 'U'; - if (1 || _odbg) + if (_odbg) { printf ("\n#w!FFB@%04lu: ", dtime); for (int i = 0; i < rlen; i++) @@ -2091,7 +2091,7 @@ FFB@00003ms: ee 40 35 20 00 06 06 f1 ff 00 00 14 14 00 00 00 00 00 00 00 00 00 0 /* * wheel data processing */ - if (1 || _odbg > 2) + if (_odbg > 2) { printf ("\n#w!UNK pkt: "); for (int i = 0; i < rlen; i++)