Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/M5GFX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2432,10 +2432,12 @@ The usage of each pin is as follows.
for (auto &bup : backup_pins2) { bup.restore(); }
if ((result & 3) == 3) {
m5gfx::i2c::i2c_temporary_switcher_t backup_i2c_setting(1, GPIO_NUM_5, GPIO_NUM_6);
result = (m5gfx::i2c::transactionWrite(1, 0x40, nullptr, 0).has_value()
&& m5gfx::i2c::transactionWrite(1, 0x41, nullptr, 0).has_value());
// Keep the probe result out of `result`; the CardputerADV check below
// still needs the G8/G9 bits of the GPIO read.
bool is_vameter = (m5gfx::i2c::transactionWrite(1, 0x40, nullptr, 0).has_value()
&& m5gfx::i2c::transactionWrite(1, 0x41, nullptr, 0).has_value());
backup_i2c_setting.restore();
if (result) {
if (is_vameter) {
board = board_t::board_M5VAMeter;
}
}
Expand Down
Loading