Flussdiagramm
psa
Inhalt des Flussdiagramms
START
Initialize input task veriables
Set s1 and s2 flags to 0 and set the selected command.
s4884745_rcdmin_button_read()
s1_flag = 1?
Increment the selected cmd
maximum increment?
return to the first cmd
Send the cmd_update and s1_pressed to output queue
s3_flag = 1?
s4884745_rcdmin_switchbank()
Form output:
cmd = selected_cmd, value = VALUE[7:0]
Send output to RCDM queue and s3_pressed to output queue
Delay 50ms
START
Set S1 = 0, S3 = 0, and all event flags to 0.
s1 = read s1 state and s3 = read s3 state.
for both buttons:
pressed = 0, release = 1
S1 edge release to press?
set s1_event = 1;
previous_s1 = current_s1
S3 edge release to press?
s3_event = 0;
previous_s3 = current_s3
return:
s1_event and s3_event
END of function
START
value = 0
bit_index = 0
Read swich input.
value[bit_index] = switch_state
bit_index=bit_index+1;
bit_index < 8
Return VALUE[7:0]
END
START
Initialise output task variables, cmd display to OLED, XYZ display and LED state.
Receive message from output queue
message received?
message = cmd_update?
message = xyz_update?
message = btn_press?
s4884745_rcdmout_display(message)
s4884745_rcdmout_update_btn(message)
s4884745_rcdmout_display_xyz(message)
keep current output
rtos delay 50ms
Y
START
input command
cmd valid?
Used default input
Output 4-bit display pattern for the cmd
s4884745_rdcminit()
LTA1000G map bits to SEG0 through to 3
Set SEG0 = bit_0; SEG1= bit_1; SEG2=bit_2; SEG=bit_3
Return output
END
START
get acc_val
= [val1, val2, vla3]
Display to 7 segment display
axis == X?
axis == Y?
axis == Z?
set X
set Y
set Z
Refresh 7 segment display
END
START
input of some sort
button press?
Radio tx?
Set D2 high
Set D1 high
Store LED state for next output
Return current state
START
xQueueReceive(txQueue, &msg, 10 ticks)
message received?
Init radio tx variables.
Build radio packed from message
s4884745_hamming(message);
s4884745_reg_tx_send_packet()
tx success?
send tx semaphore to output queue
Keep error state
50ms rtos delay
Informationen
- Beschreibung
- Flussdiagramm am psa, erstellt von Dominic Shevchuk am 03/05/2026.
- Erstellt von
- Dominic Shevchuk
- Aufrufe
- 0
- Bewertung