Skip to content

Commit 20c76ad

Browse files
legonigelrbiasini
authored andcommitted
Power Saving (#169)
* Only turn on wifi if not eon * Make sure esp is disabled on eon * Dont disable ESP in early
1 parent c6eeaad commit 20c76ad

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

board/gpio.h

+1
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ void early() {
454454
#ifdef PANDA
455455
// enable the ESP, disable ESP boot mode
456456
// unless we are on a giant panda, then there's no ESP
457+
// dont disable on grey panda
457458
if (is_giant_panda) {
458459
set_esp_mode(ESP_DISABLED);
459460
} else {

board/main.c

+3
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,9 @@ int main() {
539539
} else {
540540
// enable ESP uart
541541
uart_init(USART1, 115200);
542+
#ifdef EON
543+
set_esp_mode(ESP_DISABLED);
544+
#endif
542545
}
543546
// enable LIN
544547
uart_init(UART5, 10400);

python/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ def flash_static(handle, code):
250250
pass
251251

252252
def flash(self, fn=None, code=None, reconnect=True):
253+
print("flash: main version is " + self.get_version())
253254
if not self.bootstub:
254255
self.reset(enter_bootstub=True)
255256
assert(self.bootstub)
@@ -270,7 +271,7 @@ def flash(self, fn=None, code=None, reconnect=True):
270271
code = f.read()
271272

272273
# get version
273-
print("flash: version is " + self.get_version())
274+
print("flash: bootstub version is " + self.get_version())
274275

275276
# do flash
276277
Panda.flash_static(self._handle, code)

0 commit comments

Comments
 (0)