@@ -534,24 +534,24 @@ bool cbDecodeSignalRequestI2C(pb_istream_t *stream, const pb_field_t *field,
534
534
wippersnapper_signal_v1_I2CResponse_init_zero;
535
535
if (field->tag == wippersnapper_signal_v1_I2CRequest_req_i2c_init_tag) {
536
536
WS_DEBUG_PRINTLN (" I2C Init Request Found!" );
537
- // Decode I2CInitRequest
538
- wippersnapper_i2c_v1_I2CInitRequest msgI2cInitRequest =
539
- wippersnapper_i2c_v1_I2CInitRequest_init_zero ;
540
- if (!pb_decode (stream, wippersnapper_i2c_v1_I2CInitRequest_fields ,
541
- &msgI2cInitRequest )) {
537
+ // Decode I2CBusInitRequest
538
+ wippersnapper_i2c_v1_I2CBusInitRequest msgI2CBusInitRequest =
539
+ wippersnapper_i2c_v1_I2CBusInitRequest_init_zero ;
540
+ if (!pb_decode (stream, wippersnapper_i2c_v1_I2CBusInitRequest_fields ,
541
+ &msgI2CBusInitRequest )) {
542
542
WS_DEBUG_PRINTLN (
543
- " ERROR: Could not decode wippersnapper_i2c_v1_I2CInitRequest " );
543
+ " ERROR: Could not decode wippersnapper_i2c_v1_I2CBusInitRequest " );
544
544
return false ; // fail out
545
545
}
546
546
547
547
// Create a new I2C Component
548
- if (msgI2cInitRequest .i2c_port_number == 0 ) {
549
- WS._i2cPort0 = new WipperSnapper_Component_I2C (&msgI2cInitRequest );
548
+ if (msgI2CBusInitRequest .i2c_port_number == 0 ) {
549
+ WS._i2cPort0 = new WipperSnapper_Component_I2C (&msgI2CBusInitRequest );
550
550
WS.i2cComponents .push_back (WS._i2cPort0 );
551
551
// did we init. the port successfully?
552
552
is_success = WS._i2cPort0 ->isInitialized ();
553
- } else if (msgI2cInitRequest .i2c_port_number == 1 ) {
554
- WS._i2cPort1 = new WipperSnapper_Component_I2C (&msgI2cInitRequest );
553
+ } else if (msgI2CBusInitRequest .i2c_port_number == 1 ) {
554
+ WS._i2cPort1 = new WipperSnapper_Component_I2C (&msgI2CBusInitRequest );
555
555
// did we init. the port successfully?
556
556
is_success = WS._i2cPort1 ->isInitialized ();
557
557
WS.i2cComponents .push_back (WS._i2cPort1 );
@@ -573,13 +573,13 @@ bool cbDecodeSignalRequestI2C(pb_istream_t *stream, const pb_field_t *field,
573
573
wippersnapper_signal_v1_I2CRequest_req_i2c_scan_tag) {
574
574
WS_DEBUG_PRINTLN (" I2C Scan Request" );
575
575
576
- // Decode I2CScanRequest
577
- wippersnapper_i2c_v1_I2CScanRequest msgScanReq =
578
- wippersnapper_i2c_v1_I2CScanRequest_init_zero ;
579
- if (!pb_decode (stream, wippersnapper_i2c_v1_I2CScanRequest_fields ,
576
+ // Decode I2CBusScanRequest
577
+ wippersnapper_i2c_v1_I2CBusScanRequest msgScanReq =
578
+ wippersnapper_i2c_v1_I2CBusScanRequest_init_zero ;
579
+ if (!pb_decode (stream, wippersnapper_i2c_v1_I2CBusScanRequest_fields ,
580
580
&msgScanReq)) {
581
581
WS_DEBUG_PRINTLN (
582
- " ERROR: Could not decode wippersnapper_i2c_v1_I2CScanRequest " );
582
+ " ERROR: Could not decode wippersnapper_i2c_v1_I2CBusScanRequest " );
583
583
return false ; // fail out if we can't decode the request
584
584
}
585
585
@@ -591,8 +591,8 @@ bool cbDecodeSignalRequestI2C(pb_istream_t *stream, const pb_field_t *field,
591
591
}
592
592
593
593
// Perform I2C scan
594
- wippersnapper_i2c_v1_I2CScanResponse scanResp =
595
- wippersnapper_i2c_v1_I2CScanResponse_init_zero ;
594
+ wippersnapper_i2c_v1_I2CBusScanResponse scanResp =
595
+ wippersnapper_i2c_v1_I2CBusScanResponse_init_zero ;
596
596
if (msgScanReq.i2c_port_number == 0 ) {
597
597
scanResp = WS._i2cPort0 ->scanAddresses ();
598
598
} else {
0 commit comments