You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -304,6 +349,15 @@ impl NinaConcreteParam for NinaLargeArrayParam {
304
349
}
305
350
}
306
351
352
+
implDefaultforNinaLargeArrayParam{
353
+
fndefault() -> Self{
354
+
Self{
355
+
length:0,
356
+
data:Vec::new(),
357
+
}
358
+
}
359
+
}
360
+
307
361
pub(crate)traitProtocolInterface{
308
362
fninit(&mutself);
309
363
fnreset<D:DelayMs<u16>>(&mutself,delay:&mutD);
@@ -356,6 +410,9 @@ pub enum ProtocolError {
356
410
InvalidNumberOfParameters,
357
411
/// Too many parameters sent over the data bus.
358
412
TooManyParameters,
413
+
/// Payload is larger than the maximum buffer size allowed for transmission over
414
+
/// the data bus.
415
+
PayloadTooLarge,
359
416
}
360
417
361
418
implFormatforProtocolError{
@@ -365,7 +422,8 @@ impl Format for ProtocolError {
365
422
ProtocolError::CommunicationTimeout => write!(fmt,"Communication with ESP32 target timed out."),
366
423
ProtocolError::InvalidCommand => write!(fmt,"Encountered an invalid command while communicating with ESP32 target."),
367
424
ProtocolError::InvalidNumberOfParameters => write!(fmt,"Encountered an unexpected number of parameters for a NINA command while communicating with ESP32 target."),
368
-
ProtocolError::TooManyParameters => write!(fmt,"Encountered too many parameters for a NINA command while communicating with ESP32 target.")
425
+
ProtocolError::TooManyParameters => write!(fmt,"Encountered too many parameters for a NINA command while communicating with ESP32 target."),
426
+
ProtocolError::PayloadTooLarge => write!(fmt,"The payload is larger than the max buffer size allowed for a NINA parameter while communicating with ESP32 target."),
0 commit comments