Skip to content

Commit

Permalink
fix wrong use of constants
Browse files Browse the repository at this point in the history
  • Loading branch information
marcnause committed Dec 10, 2024
1 parent 4cce908 commit df39058
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/src/main/java/io/pslab/sensors/SensorCCS811.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
public class SensorCCS811 extends AbstractSensorActivity {
private static final String TAG = SensorCCS811.class.getSimpleName();

private static final String KEY_ENTRIES_CO2 = TAG + "_entries_eco2";
private static final String KEY_ENTRIES_ECO2 = TAG + "_entries_eco2";
private static final String KEY_ENTRIES_TVOC = TAG + "_entries_tvoc";
private static final String KEY_VALUE_ECO2 = TAG + "_value_eco2";
private static final String KEY_VALUE_TVOC = TAG + "_value_tvoc";
Expand Down Expand Up @@ -136,7 +136,7 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
tvSensorCCS811eCO2.setText(savedInstanceState.getString(KEY_VALUE_ECO2));
tvSensorCCS811TVOC.setText(savedInstanceState.getString(KEY_VALUE_TVOC));

entrieseCO2 = savedInstanceState.getParcelableArrayList(KEY_ENTRIES_CO2);
entrieseCO2 = savedInstanceState.getParcelableArrayList(KEY_ENTRIES_ECO2);
entriesTVOC = savedInstanceState.getParcelableArrayList(KEY_ENTRIES_TVOC);

sensorDataFetch.updateUi();
Expand All @@ -147,10 +147,10 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
protected void onSaveInstanceState(@NonNull Bundle outState) {
super.onSaveInstanceState(outState);

outState.putString(KEY_ENTRIES_CO2, tvSensorCCS811eCO2.getText().toString());
outState.putString(KEY_VALUE_ECO2, tvSensorCCS811eCO2.getText().toString());
outState.putString(KEY_VALUE_TVOC, tvSensorCCS811TVOC.getText().toString());

outState.putParcelableArrayList(KEY_ENTRIES_CO2, entrieseCO2);
outState.putParcelableArrayList(KEY_ENTRIES_ECO2, entrieseCO2);
outState.putParcelableArrayList(KEY_ENTRIES_TVOC, entriesTVOC);
}

Expand Down

0 comments on commit df39058

Please sign in to comment.