1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +03:00

remove sirinfpv related stuff from config.c, rename rtc6705 to soft_spi_rtc6705, fix some minor bugs

This commit is contained in:
Evgeny Sychov 2016-06-14 01:05:51 -07:00
parent cbb09d5470
commit 067c02bbd6
9 changed files with 41 additions and 43 deletions

View file

@ -34,11 +34,15 @@
#define DISABLE_MAX7456 GPIO_SetBits(MAX7456_CS_GPIO, MAX7456_CS_PIN)
#define ENABLE_MAX7456 GPIO_ResetBits(MAX7456_CS_GPIO, MAX7456_CS_PIN)
/** PAL or NTSC, value is number of chars total */
#define VIDEO_MODE_PIXELS_NTSC 390
#define VIDEO_MODE_PIXELS_PAL 480
uint16_t max_screen_size;
uint8_t video_signal_type = 0;
uint8_t max7456_lock = 0;
char screen[480];
char screen[VIDEO_MODE_PIXELS_PAL];
uint8_t max7456_send(uint8_t add, uint8_t data) {
@ -81,10 +85,10 @@ void max7456_init(uint8_t system) {
}
if (video_signal_type) { //PAL
max_screen_size = 480;
max_screen_size = VIDEO_MODE_PIXELS_PAL;
max_screen_rows = 16;
} else { // NTSC
max_screen_size = 390;
max_screen_size = VIDEO_MODE_PIXELS_NTSC;
max_screen_rows = 13;
}
@ -121,7 +125,7 @@ void max7456_write_string(const char *string, int16_t address) {
else
dest = screen + (max_screen_size + address);
while(*string)
while(*string && dest < (screen + max_screen_size))
*dest++ = *string++;
}