Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
F23-BLE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
kpd10
F23-BLE
Commits
d28e54d5
Commit
d28e54d5
authored
1 year ago
by
kpd10
Browse files
Options
Downloads
Plain Diff
Merge branch 'bluetooth_fix' into 'main'
updated state diagram See merge request
!2
parents
803a3a90
28f2619d
Branches
main
No related tags found
1 merge request
!2
updated state diagram
Pipeline
#459341
failed
1 year ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
out/state_diagram/State Diagram.png
+0
-0
0 additions, 0 deletions
out/state_diagram/State Diagram.png
state_diagram.puml
+22
-15
22 additions, 15 deletions
state_diagram.puml
with
22 additions
and
15 deletions
out/state_diagram/State Diagram.png
0 → 100644
+
0
−
0
View file @
d28e54d5
70.8 KiB
This diff is collapsed.
Click to expand it.
state_diagram.puml
+
22
−
15
View file @
d28e54d5
...
...
@@ -9,8 +9,8 @@ read -left-> run
run -down-> send : send button callback
send -up-> run
read -down->
stop
: VBUS is connected
stop
-up-> read : VBUS disconnected
read -down->
vbus
: VBUS is connected
vbus
-up-> read : VBUS disconnected
error -up-> init : sensor connected
state error {
...
...
@@ -21,12 +21,13 @@ state error {
error_exit : turn off Error LED
}
state stop {
stop_entry -down-> stop_run
stop_run -up-> stop_exit
stop_entry : start Error LED timer
stop_run : wait for VBUS to be disconnected
stop_exit : stop Error LED timer
state vbus {
vbus_entry -down-> vbus_run
vbus_run -up-> vbus_exit
vbus_entry : start Error LED timer
vbus_run : wait for VBUS to be disconnected
vbus_exit : stop Error LED timer
vbus_exit : start checking for VBUS aain
}
state init {
...
...
@@ -36,36 +37,42 @@ state init {
init_entry : Configure Interfaces
init_entry : Read device config from NVM
init_entry : Associate and initialize Callbacks
init_entry : initialize bluetooth
init_entry : check if sensor is connected
init_run : go to run state
init_exit : initialize pwm leds to be zero
init_exit : begin heartbeat LED
init_exit : begin VBUS checking timer
}
state run {
run_entry -> run_run
run_run -> run_exit
run_run : wait for save button event
run_run : wait for send button event
}
state read {
read_entry -> read_run
read_run -> read_exit
read_entry : check that VBUS is not connnected
read_entry : Read 100 Hz ADC in
read_entry : Read 500 Hz ADC in
read_entry : Read Pressure Info in
read_entry : Read Battery ADC in
read_entry : Reazd Pressure Info in
read_entry : Convert ADC values to mV
read_
entry : Convert mV to corresponding brightness and pressure
read_
entry : Turn on LEDs at appropriate brightness
read_
entry : upd
at
e
a
rray with pressure and LED
brightness
read_run :
wait for send button event
read_
run : wait for arrays to be filled with data
read_
run : Convert mV to corresponding brightness and pressure
read_
run : Turn on LEDs
at a
ppropriate
brightness
read_run :
update array with pressure and LED brightness
read_run : go back to run state
read_exit : turn 100 Hz and 500 Hz LEDs off
}
state send {
send_entry -> send_run
send_run -> send_exit
send_entry : turn off LEDs
send_entry : Read Battery ADC in
send_run : format array for export
send_run : send array via Bluetooth to app
send_run : send battery level via Bluetooth to app
send_run : return to run state
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment