Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change iteration variable of the nested for statement #224

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions library/src/dsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ static int __continue_or_quit(void)
*/
static void* __parser_func(__attribute__ ((unused)) void* ptr){
uint8_t buf[DSM_PACKET_SIZE];
int i, ret;
int i, j, ret;
int new_values[RC_MAX_DSM_CHANNELS]; // hold new values before committing
int detection_packets_left; // use first 4 packets just for detection
unsigned char ch_id;
Expand Down Expand Up @@ -396,8 +396,8 @@ static void* __parser_func(__attribute__ ((unused)) void* ptr){
#ifdef DEBUG
fprintf(stderr,"missing channel data in packet\n");
#endif
for(i=0;i<num_channels;i++){
new_values[i]=0;// put local values array back to 0
for(j=0;j<num_channels;j++){
new_values[j]=0;// put local values array back to 0
}
}
}
Expand Down