- public int log_limit() {
- if (storage_size > 0 && storage_erase_unit > 0) {
- int log_limit = storage_size - storage_erase_unit;
- if (log_limit > 0)
- return log_limit / 1024;
+ boolean use_flash_for_config() {
+ if (product.startsWith("TeleMega"))
+ return false;
+ if (product.startsWith("TeleMetrum-v2"))
+ return false;
+ if (product.startsWith("TeleMetrum-v3"))
+ return false;
+ if (product.startsWith("EasyMega"))
+ return false;
+ return true;
+ }
+
+
+ public boolean mma655x_inverted() throws AltosUnknownProduct {
+ if (product != null) {
+ if (product.startsWith("EasyMega-v1"))
+ return false;
+ if (product.startsWith("TeleMetrum-v2"))
+ return true;
+ if (product.startsWith("TeleMega-v2"))
+ return false;
+ if (product.startsWith("TeleMega-v1"))
+ return false;
+ }
+ throw new AltosUnknownProduct(product);
+ }
+
+ public boolean adxl375_inverted() throws AltosUnknownProduct {
+ if (product != null) {
+ if (product.startsWith("EasyMega-v2"))
+ return true;
+ if (product.startsWith("TeleMetrum-v3"))
+ return true;
+ if (product.startsWith("TeleMega-v4"))
+ return true;
+ }
+ throw new AltosUnknownProduct(product);
+ }
+
+ public int adxl375_axis() throws AltosUnknownProduct {
+ if (product != null) {
+ if (product.startsWith("EasyMega-v2"))
+ return AltosAdxl375.X_AXIS;
+ if (product.startsWith("TeleMetrum-v3"))
+ return AltosAdxl375.X_AXIS;
+ if (product.startsWith("TeleMega-v4"))
+ return AltosAdxl375.X_AXIS;