package dev.kaderli.magsend

import android.hardware.SensorEvent
import android.os.Bundle
import android.widget.TextView

class CalibrationActivity : BaseSensorActivity() {
  private lateinit var calibrationValue: TextView

  override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    calibrationValue = findViewById(R.id.calibrationValue)
    calibrationValue.text = getString(R.string.calibration_value, 0f)
  }

  override fun getLayoutId(): Int {
    return R.layout.activity_calibration
  }

  override fun onSensorChanged(event: SensorEvent) {
    calibrationValue.text = getString(R.string.calibration_value, event.values[0])
  }
}
