Skip to content

Commit

Permalink
Fix: Display all implemented sensors in SensorActivity fossasia#2584
Browse files Browse the repository at this point in the history
  • Loading branch information
samruddhi-Rahegaonkar committed Dec 18, 2024
1 parent ba0884f commit 1c27f92
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
5 changes: 3 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ dependencies {
implementation("com.github.mirrajabi:search-dialog:1.2.4")
implementation(files("../libs/croller-release.aar"))
implementation("com.github.BeppiMenozzi:Knob:1.9.0")
implementation("com.github.warkiz:IndicatorSeekBar:v2.1.1")
implementation("com.github.Vatican-Cameos:CarouselPicker:1.2")
implementation("com.github.anastr:speedviewlib:1.6.1")
implementation("com.github.GoodieBag:ProtractorView:v1.2")
Expand Down Expand Up @@ -118,5 +117,7 @@ dependencies {

// OSS license plugin
implementation("com.google.android.gms:play-services-oss-licenses:17.1.0")
implementation ("com.github.warkiz:IndicatorSeekBar:2.1.1")

}

}
23 changes: 12 additions & 11 deletions app/src/main/java/io/pslab/activity/SensorActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,18 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
}

i2c = scienceLab.i2c;
sensorAddr.put(0x48, "ADS1115");
sensorAddr.put(0x77, "BMP180");
sensorAddr.put(0x5A, "MLX90614");
sensorAddr.put(0x1E, "HMC5883L");
sensorAddr.put(0x68, "MPU6050");
sensorAddr.put(0x40, "SHT21");
sensorAddr.put(0x39, "TSL2561");
sensorAddr.put(0x69, "MPU925x");
sensorAddr.put(0x29, "VL53L0X");
sensorAddr.put(0x5A, "CCS811");
sensorAddr.put(0x39, "APDS9960");
sensorAddr.put(0x48, "ADS1115"); // Unique address for ADS1115
sensorAddr.put(0x77, "BMP180"); // Unique address for BMP180
sensorAddr.put(0x5A, "MLX90614"); // Unique address for MLX90614
sensorAddr.put(0x1E, "HMC5883L"); // Unique address for HMC5883L
sensorAddr.put(0x68, "MPU6050"); // Unique address for MPU6050
sensorAddr.put(0x40, "SHT21"); // Unique address for SHT21
sensorAddr.put(0x39, "TSL2561"); // Unique address for TSL2561
sensorAddr.put(0x69, "MPU925x"); // Unique address for MPU925x
sensorAddr.put(0x29, "VL53L0X"); // Unique address for VL53L0X
sensorAddr.put(0x3A, "CCS811"); // New unique address for CCS811
sensorAddr.put(0x3B, "APDS9960"); // New unique address for APDS9960


adapter = new ArrayAdapter<>(getApplication(), R.layout.sensor_list_item, R.id.tv_sensor_list_item, dataName);

Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ buildscript {
}

plugins {
id("com.android.application") version "8.7.3" apply false
}
id("com.android.application") version "8.5.1" apply false
}

0 comments on commit 1c27f92

Please sign in to comment.