Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion RC_Rx_header_example/rc_rx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,12 @@ void init_rc_rx(){
}

void read_rc_rx(){
noInterrupts();
CH1 = ((float)CH1_delta-(float)min_high_time)*100/(max_high_time-min_high_time);
CH2 = ((float)CH2_delta-(float)min_high_time)*100/(max_high_time-min_high_time);
CH3 = ((float)CH3_delta-(float)min_high_time)*100/(max_high_time-min_high_time);
CH4 = ((float)CH4_delta-(float)min_high_time)*100/(max_high_time-min_high_time);

interrupts();
}


Expand Down
3 changes: 2 additions & 1 deletion RC_Rx_header_example_ver_0_2/rc_rx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,15 @@ void init_rc_rx(){
}

void read_rc_rx(){
noInterrupts();
CH1 = ((float)CH1_delta-(float)min_high_time)*100/(max_high_time-min_high_time);
CH2 = ((float)CH2_delta-(float)min_high_time)*100/(max_high_time-min_high_time);
CH3 = ((float)CH3_delta-(float)min_high_time)*100/(max_high_time-min_high_time);
CH4 = ((float)CH4_delta-(float)min_high_time)*100/(max_high_time-min_high_time);
CH5 = ((float)CH5_delta-(float)min_high_time)*100/(max_high_time-min_high_time);
CH6 = ((float)CH6_delta-(float)min_high_time)*100/(max_high_time-min_high_time);
CH7 = ((float)CH7_delta-(float)min_high_time)*100/(max_high_time-min_high_time);

interrupts();
}


Expand Down