Description
We should never have #if
within a class definition. But we have:
Catena-Arduino-Platform/src/CatenaStm32L0.h
Lines 72 to 77 in 04e0d46
The pin definitions have to go either in the terminal board class, or in a common class for feathers and another for non-feathers (of which the 4801 is the first instance). If we want a common methods to get the battery and usb voltage, we need virtual methods in CatenaStm32L0.h, and then override them with concrete methods at the level where the appropriate definitions are in scope. So: in CatenaStmm32L0.h, we want:
virtual float ReadVbat(void) const = 0;
virtual float ReadVbus(void) const = 0;
For the 4801, we'll need to provide a dummy method that returns 0.0 for ReadVbus()
.