simulation supports scrolltext now. Own pgmspace.h added which works around pgmspace functions not being available on PC.
This commit is contained in:
parent
1598091e0c
commit
9917c5b72b
|
@ -87,6 +87,15 @@ void off()
|
|||
#endif
|
||||
|
||||
#ifdef ANIMATION_SPIRALE
|
||||
|
||||
void walk(cursor* cur, unsigned char steps, unsigned int delay){
|
||||
unsigned char x;
|
||||
for(x=0;x<steps;x++){
|
||||
set_cursor(cur, next_pixel(cur->pos, cur->dir));
|
||||
wait(delay);
|
||||
}
|
||||
}
|
||||
|
||||
void spirale(unsigned int delay){
|
||||
clear_screen(0);
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
#include <setjmp.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "scrolltext/scrolltext.h"
|
||||
|
@ -33,10 +34,6 @@ void display_loop(){
|
|||
#ifdef ANIMATION_SCROLLTEXT
|
||||
case 1:
|
||||
scrolltext(scrolltext_text);
|
||||
{ char a[14];
|
||||
sprintf(a,"</# counter == %lu ", percnt_get());
|
||||
scrolltext(a);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
//pc compatibility of AVR-pgmspace stuff for compiling simulator
|
||||
|
||||
#ifdef AVR
|
||||
#include <avr/pgmspace.h>
|
||||
#else
|
||||
#define PROGMEM
|
||||
#define strcpy_P strcpy
|
||||
#define memcpy_P memcpy
|
||||
#define pgm_read_byte(a) ((*(uint8_t*)(a)))
|
||||
#define pgm_read_word(a) ((*(uint16_t*)(a)))
|
||||
#endif
|
|
@ -1,12 +1,7 @@
|
|||
#ifndef FONT_H
|
||||
#define FONT_H
|
||||
#ifdef AVR
|
||||
# include <avr/pgmspace.h>
|
||||
#else
|
||||
# define PROGMEM
|
||||
# define pgm_read_byte(B) *(B)
|
||||
# define pgm_read_word(B) *(B)
|
||||
#endif
|
||||
|
||||
#include "../pgmspace.h"
|
||||
|
||||
typedef struct{
|
||||
unsigned char fontHeight;
|
||||
|
|
|
@ -6,12 +6,10 @@
|
|||
|
||||
#include "../config.h"
|
||||
#include "scrolltext.h"
|
||||
#ifdef AVR
|
||||
# include "../borg_hw/borg_hw.h"
|
||||
#endif
|
||||
|
||||
#include "../pixel.h"
|
||||
#include "../util.h"
|
||||
#include "../pgmspace.h"
|
||||
#include "font_arial8.h"
|
||||
#include "font_small6.h"
|
||||
#include "font_uni53.h"
|
||||
|
|
|
@ -197,6 +197,7 @@ void timf(int value) {
|
|||
|
||||
void *display_loop_run(void * unused) {
|
||||
display_loop();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv){
|
||||
|
|
Loading…
Reference in New Issue