Subversion Repositories Projects

Rev

Rev 385 | Rev 387 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 385 Rev 386
Line 187... Line 187...
187
/**
187
/**
188
 * convert the <heading> gotton from NC into a more
188
 * convert the <heading> gotton from NC into a more
189
 * precise index
189
 * precise index
190
 */
190
 */
191
uint8_t heading_fine_conv(uint16_t heading) {
191
uint8_t heading_fine_conv(uint16_t heading) {
192
        if (heading > 337) return 0;
192
        heading = ((heading * 10) + 113) % 3600;
193
        return (heading * 10) / 225;
193
        return (heading / 225);
194
}
194
}
Line 195... Line 195...
195
 
195
 
196
/**
196
/**
197
 * draw a compass rose at <x>/<y> for <heading>
197
 * draw a compass rose at <x>/<y> for <heading>
Line 691... Line 691...
691
 
691
 
692
        /*write_ndigit_number_s_10th(5, 10, 1, 100, 0);
692
        /*write_ndigit_number_s_10th(5, 10, 1, 100, 0);
693
        write_ndigit_number_s_10th(5, 11, -1, 100, 0);
693
        write_ndigit_number_s_10th(5, 11, -1, 100, 0);
Line 694... Line 694...
694
        write_ndigit_number_s_10th(5, 12, -11, 100, 0);*/
694
        write_ndigit_number_s_10th(5, 12, -11, 100, 0);*/
-
 
695
 
Line 695... Line 696...
695
 
696
        //write_ndigit_number_u(2,2, heading_fine_conv(34), 100, 0);
696
        //write_ndigit_number_u(2,2, heading_fine_conv(45), 100, 0);
697
        //write_char_xy(1, 2, 0xa0 + heading_fine_conv(34));
697
 
698
 
698
    while (1) {
699
    while (1) {