File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -431,7 +431,10 @@ void Modbus::slavePDU(uint8_t* frame) {
431431 break ;
432432
433433 default :
434- exceptionResponse (fcode, EX_ILLEGAL_FUNCTION);
434+ ex = _onRequest (fcode, {frame + 1 });
435+ if (ex != EX_PASSTHROUGH) {
436+ exceptionResponse (fcode, EX_ILLEGAL_FUNCTION);
437+ }
435438 return ;
436439 }
437440}
Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ class Modbus {
153153 uint16_t andMask;
154154 uint16_t orMask;
155155 };
156+ uint8_t * data;
156157 RequestData (TAddress r1, uint16_t c1) {
157158 reg = r1;
158159 regCount = c1;
@@ -168,6 +169,9 @@ class Modbus {
168169 andMask = m1;
169170 orMask = m2;
170171 };
172+ RequestData (uint8_t * d) {
173+ data = d;
174+ };
171175 };
172176
173177 struct frame_arg_t {
You can’t perform that action at this time.
0 commit comments