tinygo-org / drivers

TinyGo drivers for sensors, displays, wireless adaptors, and other devices that use I2C, SPI, GPIO, ADC, and UART interfaces.
https://tinygo.org
BSD 3-Clause "New" or "Revised" License
587 stars 180 forks source link

Revert "(#501) make IP.String() method return something sensible" #570

Closed deadprogram closed 1 year ago

deadprogram commented 1 year ago

Reverts tinygo-org/drivers#502 due to it (quietly) breaking code that indirectly uses it, such as the wifinina examples.

Any of the code that uses DNS lookups ends up failing due to invalid IP addresses passed between the driver net and wifinina packages.

deadprogram commented 1 year ago

Before the revert:

Connected to /dev/ttyACM0. Press Ctrl-C to exit.                                                                                                  
Connecting to XXXX                                                                                                                                
Connecting to XXXX                                                                                                                                
Connected.                                                                                                                                        
IP address: 192.168.1.229                                                                                                                         
Connecting to MQTT broker at tcp://test.mosquitto.org:1883                                                                                        
wifinina error: TimeoutChipReady                                                                                                                  
wifinina error: TimeoutChipReady                                                                                                                  
wifinina error: TimeoutChipReady

After the revert:

Connected to /dev/ttyACM0. Press Ctrl-C to exit.                                                                                                  
Connecting to XXXX
Connecting to XXXX
Connected.
IP address: 192.168.1.229
Connecting to MQTT broker at tcp://test.mosquitto.org:1883
Publishing MQTT message...
Publishing MQTT message...
[tinygo/rx]  {"e":[{"n":"hello 0","v":101}]}
Publishing MQTT message...
[tinygo/rx]  {"e":[{"n":"hello 1","v":101}]}
Publishing MQTT message...
[tinygo/rx]  {"e":[{"n":"hello 2","v":101}]}
deadprogram commented 1 year ago

Thanks for review @ysoldak now merging.