Skip to content

Commit ea577e5

Browse files
authored
Merge branch 'master' into follow-redirects-http-update
2 parents 63caf0c + 5da4a47 commit ea577e5

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

cores/esp32/esp32-hal-spi.c

+14-2
Original file line numberDiff line numberDiff line change
@@ -914,8 +914,20 @@ void spiTransferBytesNL(spi_t * spi, const void * data_in, uint8_t * data_out, u
914914
spi->dev->cmd.usr = 1;
915915
while(spi->dev->cmd.usr);
916916
if(result){
917-
for (int i=0; i<c_longs; i++) {
918-
result[i] = spi->dev->data_buf[i];
917+
if(c_len & 3){
918+
for (int i=0; i<(c_longs-1); i++) {
919+
result[i] = spi->dev->data_buf[i];
920+
}
921+
uint32_t last_data = spi->dev->data_buf[c_longs-1];
922+
uint8_t * last_out8 = &result[c_longs-1];
923+
uint8_t * last_data8 = &last_data;
924+
for (int i=0; i<(c_len & 3); i++) {
925+
last_out8[i] = last_data8[i];
926+
}
927+
} else {
928+
for (int i=0; i<c_longs; i++) {
929+
result[i] = spi->dev->data_buf[i];
930+
}
919931
}
920932
}
921933
if(data){

docs/arduino-ide/debian_ubuntu.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Installation instructions for Debian / Ubuntu OS
88
sudo usermod -a -G dialout $USER && \
99
sudo apt-get install git && \
1010
wget https://bootstrap.pypa.io/get-pip.py && \
11-
sudo python get-pip.py && \
12-
sudo pip install pyserial && \
11+
sudo python3 get-pip.py && \
12+
sudo pip3 install pyserial && \
1313
mkdir -p ~/Arduino/hardware/espressif && \
1414
cd ~/Arduino/hardware/espressif && \
1515
git clone https://github.com/espressif/arduino-esp32.git esp32 && \

libraries/WiFi/src/WiFiSTA.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ wl_status_t WiFiSTAClass::begin(const char* ssid, const char *passphrase, int32_
134134
wifi_config_t conf;
135135
memset(&conf, 0, sizeof(wifi_config_t));
136136
strcpy(reinterpret_cast<char*>(conf.sta.ssid), ssid);
137+
conf.sta.scan_method = WIFI_ALL_CHANNEL_SCAN; //force full scan to be able to choose the nearest / strongest AP
137138

138139
if(passphrase) {
139140
if (strlen(passphrase) == 64){ // it's not a passphrase, is the PSK

libraries/WiFi/src/WiFiSTA.h

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ class WiFiSTAClass
7474

7575
const char * getHostname();
7676
bool setHostname(const char * hostname);
77+
bool hostname(const String& aHostname) { return setHostname(aHostname.c_str()); }
7778

7879
// STA WiFi info
7980
static wl_status_t status();

0 commit comments

Comments
 (0)