Subversion Repositories Projects

Rev

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

Rev 761 Rev 800
Line 16... Line 16...
16
 *   along with this program; if not, write to the                          *
16
 *   along with this program; if not, write to the                          *
17
 *   Free Software Foundation, Inc.,                                        *
17
 *   Free Software Foundation, Inc.,                                        *
18
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.              *
18
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.              *
19
 ****************************************************************************/
19
 ****************************************************************************/
Line 20... Line -...
20
 
-
 
21
#include <avr/pgmspace.h> 
20
 
-
 
21
#include "main.h"
22
#include "main.h"
22
#include <avr/pgmspace.h> 
23
#include "osd_helpers.h"
23
#include "osd_helpers.h"
Line 24... Line 24...
24
#include "max7456_software_spi.h"
24
#include "max7456_software_spi.h"
Line 78... Line 78...
78
        216, 215, 216, 212, 216, 215, 216, 214, 216, 215, 216, 211,
78
        216, 215, 216, 212, 216, 215, 216, 214, 216, 215, 216, 211,
79
        216, 215, 216, 213, 216, 215, 216, 212, 216, 215, 216, 214};
79
        216, 215, 216, 213, 216, 215, 216, 212, 216, 215, 216, 214};
80
    // the center is char 19 (north), we add the current heading in 8th
80
    // the center is char 19 (north), we add the current heading in 8th
81
    // which would be 22.5 degrees, but float would bloat up the code
81
    // which would be 22.5 degrees, but float would bloat up the code
82
    // and *10 / 225 would take ages... so we take the uncorrect way
82
    // and *10 / 225 would take ages... so we take the uncorrect way
83
    uint8_t front = 19 + (heading / 22);
83
    uint8_t front = 19 + ((heading % 360) / 22);
84
    for (uint8_t i = 0; i < 9; i++) {
84
    for (uint8_t i = 0; i < 9; i++) {
85
        write_char_xy(x++, y, pgm_read_byte(&rose[front - 4 + i]));
85
        write_char_xy(x++, y, pgm_read_byte(&rose[front - 4 + i]));
86
    }
86
    }
87
}
87
}