Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -2639,6 +2639,18 @@ public class SensorBitmap {
public static final int MAX86150_ECG = 1 << (3 + (8*1));
public static final int MAX86916_PPG_BLUE = 1 << (2 + (8*1));
public static final int VBATT = 1 << (1 + (8*1));

// Second-generation hardware (SR68-9/10, SR61-5/6): LSM6DSV accel/gyro +
// LIS2MDL mag. Distinct host-internal bits; accel/gyro enables are derived
// from the payload header ACCEL2/GYRO bits and mag from GEN_CFG_3 (see
// VerisenseDevice.configBytesParse second-generation branch).
public static final int LSM6DSV_ACCEL = 1 << (4 + (8*0));
public static final int LSM6DSV_GYRO = 1 << (3 + (8*0));
public static final int LSM6DSV_MAG = 1 << (2 + (8*0));
/** VD6283TX45 ambient light (second-generation HW); enable is GEN_CFG_3 bit 3. */
public static final int VD6283 = 1 << (1 + (8*0));
/** MLX90632 skin temperature (second-generation HW); enable is GEN_CFG_3 bit 4. */
public static final int MLX90632 = 1 << (0 + (8*0));
}

public class DerivedSensorsBitMask {
Expand All @@ -2652,6 +2664,9 @@ public class DerivedSensorsBitMask {
public final static int GYRO_ON_THE_FLY_CAL = (1 << 7);
public final static int ORIENTATION_6DOF_QUAT = (1 << 8);
public final static int ORIENTATION_6DOF_EULER = (1 << 9);
/** Second-generation IMU (SR61-5/6, SR68-9/10). Bit assignment must stay
* unique against any consumer that persists these derived-sensor bits. */
public final static int NON_WEAR_DETECTION_LSM6DSV = (1 << 10);
}

public class SENSOR_ID {
Expand All @@ -2667,6 +2682,12 @@ public class SENSOR_ID {
public static final int MAX86916_PPG_BLUE = 2012;
public static final int VBATT = 2013;
public static final int GSR = 2014;
// Second-generation hardware (SR68-9/10, SR61-5/6)
public static final int LSM6DSV_ACCEL = 2015;
public static final int LSM6DSV_GYRO = 2016;
public static final int LSM6DSV_MAG = 2017;
public static final int VD6283 = 2018;
public static final int MLX90632 = 2019;
}

public enum LABEL_SENSOR_TILE{
Expand Down Expand Up @@ -2709,8 +2730,17 @@ public static class CompatibilityInfoForMaps{
public static final List<ShimmerVerObject> listOfCompatibleVersionInfoVbatt = Arrays.asList(
svoVerisenseDevBrd, svoVerisenseImu, svoVerisensePpg0, svoVerisensePpg1, svoVerisenseGsrPlus, svoVerisensePulsePlus);

// SR61 (Verisense IMU) carries GSR from minor rev 5 (second-generation); the
// runtime minor-rev gating is in VerisenseDevice.doesHwSupportGsr() which
// mirrors the firmware's ShimBrd_isGsrSupportedForHwVersion.
public static final List<ShimmerVerObject> listOfCompatibleVersionInfoGsr = Arrays.asList(
svoVerisenseGsrPlus, svoVerisensePulsePlus);
svoVerisenseGsrPlus, svoVerisensePulsePlus, svoVerisenseImu);

// Second-generation IMU: LSM6DSV (accel/gyro) + LIS2MDL (mag), SR68-9/10 and
// SR61-5/6. TODO refine to HW minor gating once compat supports it; the
// runtime isPayloadDesignV13orAbove() gate protects gen-1 units meanwhile.
public static final List<ShimmerVerObject> listOfCompatibleVersionInfoLSM6DSV = Arrays.asList(
svoVerisensePulsePlus, svoVerisenseImu);
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ public enum SENSORS{
LIS3MDL("LIS3MDL"), //to be changed
LIS2MDL("LIS2MDL"),
LSM6DSV("LSM6DSV"),
VD6283("VD6283"),
MLX90632("MLX90632"),
BMP390("BMP390");

private final String text;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ public static class ObjectClusterSensorName{

// The battery voltage is divided by half before entering the Microcontroller's ADC. The value is not quite equal to 2 due to the components used in the circuit.
public static final double BATTERY_VOLTAGE_DIVIDER_RATIO = 1.988;

// Second-generation Verisense hardware (SR61-5/6, SR68-9/10) battery-sense divider.
// Matches the firmware's conversion in hal_asm_battery.c (measureBatteryVoltage).
public static final double BATTERY_VOLTAGE_DIVIDER_RATIO_GEN2 = 2.469;

//--------- Sensor specific variables end --------------

Expand Down
Loading
Loading