X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=blobdiff_plain;f=hostside%2Fhidrawconv-joytechneos.c;fp=hostside%2Fhidrawconv-joytechneos.c;h=adeb086191038b0b26dbf33cf7b3edded17cd8b3;hb=1504712066ae650e1292cdc2f9d618f9216c3426;hp=64b6a2bd36573989a7808bc7c16066fbbf3c2d0c;hpb=9dd76e3ed65499ab191de4e48ebf6c7c60de21f0;p=trains.git diff --git a/hostside/hidrawconv-joytechneos.c b/hostside/hidrawconv-joytechneos.c index 64b6a2b..adeb086 100644 --- a/hostside/hidrawconv-joytechneos.c +++ b/hostside/hidrawconv-joytechneos.c @@ -29,11 +29,21 @@ static void pr(const uint8_t *msg, int msglen, const uint8_t *last) { reportlocs(msg, last, msglen, vallocs); } +ProcessReport *const nested_processors[MAXREPORTS]= { + [0x4a] = pr +}; + const char *progname= "hidrawconv-joytechneos"; const char *const descriptor= "05010904a101854a0901a1000501093009311580257f350045ff660000750895028102c0050209ba150026ff00750895018102050209bb150026ff007508950181020501093915012508360000463b016514750895018102950c7501050945013500150025011901290c810295040605ff09018102c005140924a101854d150026ff000931750895079182c005010906a101854b050719e029e71500250175019508810295017508810195057501050819012905910295017503910195057508150025680507190029688100c0"; +static LastReports inner_lasts; + +static void pr_outer(const uint8_t *msg, int msglen, const uint8_t *last) { + dispatch(&inner_lasts,"inner message: ",nested_processors, msg+1,msglen-1); +} + ProcessReport *const report_processors[MAXREPORTS]= { - [0x4a] = pr + [0x00] = pr_outer };