This project started with a few core intentions and constraints in mind about detecting and displaying human movement and tremor activity. However, upon learning more about the nature of tremor detection, signal processing, and simply more about the necessary steps needed to build the core detection algorithm, the original structure of the app exploded in terms of complexity. The current state of things is that the AccelerometerViewModel needs a good bit of love and reworking. There are too many confusing timers, logic, and transitions not to be organized in a better way. This issue intends to record the need for the following refactor points:
The stages Idle-> Sampling -> Detecting -> Running should exist as States in a finite state machine
The timer, database, and accelerometer start/stop logic should exist as actions on transitions to the proper states
Updating the UI should be activities running in the current state
Consider better naming for the timers and UI elements
A visual flow diagram should be drafted to illustrate the state changes
This project started with a few core intentions and constraints in mind about detecting and displaying human movement and tremor activity. However, upon learning more about the nature of tremor detection, signal processing, and simply more about the necessary steps needed to build the core detection algorithm, the original structure of the app exploded in terms of complexity. The current state of things is that the
AccelerometerViewModel
needs a good bit of love and reworking. There are too many confusing timers, logic, and transitions not to be organized in a better way. This issue intends to record the need for the following refactor points:States
in a finite state machineactions
on transitions to the properstates