Skip to content
Snippets Groups Projects
Commit b628079c authored by Vytor Calixto's avatar Vytor Calixto :space_invader:
Browse files

Sorting and printing order changed

Sorting now occurs when getting a char
Data is now sent in ascending order
parent 73b922a9
No related branches found
No related tags found
No related merge requests found
......@@ -84,6 +84,7 @@ int main(){
v[i] = n;
n = 0;
i++;
insertionSort(v,i);
}else{
h = ctoi(c);
if(h != EOF) {
......@@ -94,10 +95,10 @@ int main(){
}
}
insertionSort(v,i);
char hex[9];
for(;i>0;i--){
itoc(v[i-1], hex);
int count;
for(count = 0; count < i; count++){
itoc(v[count], hex);
n = 0;
while(hex[n] != '\0') {
Putc(hex[n]);
......@@ -110,7 +111,6 @@ int main(){
writeFirstChar();
}
int count;
for(count=0;count<1000;count++); //Wait for the remote uart
return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment