Skip to content

Commit

Permalink
Power Saving (#169)
Browse files Browse the repository at this point in the history
* Only turn on wifi if not eon

* Make sure esp is disabled on eon

* Dont disable ESP in early
  • Loading branch information
legonigel authored and rbiasini committed Mar 14, 2019
1 parent c6eeaad commit 20c76ad
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions board/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ void early() {
#ifdef PANDA
// enable the ESP, disable ESP boot mode
// unless we are on a giant panda, then there's no ESP
// dont disable on grey panda
if (is_giant_panda) {
set_esp_mode(ESP_DISABLED);
} else {
Expand Down
3 changes: 3 additions & 0 deletions board/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,9 @@ int main() {
} else {
// enable ESP uart
uart_init(USART1, 115200);
#ifdef EON
set_esp_mode(ESP_DISABLED);
#endif
}
// enable LIN
uart_init(UART5, 10400);
Expand Down
3 changes: 2 additions & 1 deletion python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ def flash_static(handle, code):
pass

def flash(self, fn=None, code=None, reconnect=True):
print("flash: main version is " + self.get_version())
if not self.bootstub:
self.reset(enter_bootstub=True)
assert(self.bootstub)
Expand All @@ -270,7 +271,7 @@ def flash(self, fn=None, code=None, reconnect=True):
code = f.read()

# get version
print("flash: version is " + self.get_version())
print("flash: bootstub version is " + self.get_version())

# do flash
Panda.flash_static(self._handle, code)
Expand Down

0 comments on commit 20c76ad

Please sign in to comment.