mirror of
https://github.com/OpenEPaperLink/OpenEPaperLink.git
synced 2026-03-21 03:04:25 +01:00
fixed offset... (finally)
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
#include "drawing.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "asmUtil.h"
|
||||
#include "board.h"
|
||||
#include "cpu.h"
|
||||
#include "drawing.h"
|
||||
#include "eeprom.h"
|
||||
#include "epd.h"
|
||||
#include "printf.h"
|
||||
@@ -318,9 +320,9 @@ static void drawPrvDecodeImageOnce(void) {
|
||||
}
|
||||
}
|
||||
|
||||
static uint8_t __xdata prev, step = 0;
|
||||
|
||||
void ByteDecode(uint8_t byte) {
|
||||
static uint8_t __xdata prev, step = 0;
|
||||
prev <<= 2;
|
||||
prev |= (mColorMap[mPassNo][byte >> 4] << 1) | mColorMap[mPassNo][byte & 0x0f];
|
||||
if (++step == 4) {
|
||||
@@ -344,11 +346,15 @@ void drawImageAtAddress(uint32_t addr) {
|
||||
mPassNo = 0;
|
||||
beginFullscreenImage();
|
||||
beginWriteFramebuffer(EPD_COLOR_BLACK);
|
||||
prev = 0;
|
||||
step = 0;
|
||||
drawPrvDecodeImageOnce();
|
||||
endWriteFramebuffer();
|
||||
mPassNo++;
|
||||
beginFullscreenImage();
|
||||
beginWriteFramebuffer(EPD_COLOR_RED);
|
||||
prev = 0;
|
||||
step = 0;
|
||||
drawPrvDecodeImageOnce();
|
||||
endWriteFramebuffer();
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
#include "userinterface.h"
|
||||
#include "wdt.h"
|
||||
|
||||
//#define DEBUG_MODE
|
||||
|
||||
uint8_t showChannelSelect() {
|
||||
uint8_t __xdata result[16];
|
||||
memset(result, 0, sizeof(result));
|
||||
@@ -79,7 +81,7 @@ void mainProtocolLoop(void) {
|
||||
eepromDeepPowerDown();
|
||||
// initialize Powers-saving-attempt-array with the default value;
|
||||
initPowerSaving();
|
||||
|
||||
#ifndef DEBUG_MODE
|
||||
// show the splashscreen
|
||||
showSplashScreen();
|
||||
|
||||
@@ -91,10 +93,15 @@ void mainProtocolLoop(void) {
|
||||
// couldn't find an AP :()
|
||||
showNoAP();
|
||||
} else {
|
||||
radioSetChannel(currentChannel);
|
||||
// Found an AP.
|
||||
showAPFound();
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifdef DEBUG_MODE
|
||||
initRadio();
|
||||
currentChannel = 11;
|
||||
#endif
|
||||
epdEnterSleep();
|
||||
|
||||
P1CHSTA &= ~(1 << 0);
|
||||
|
||||
Reference in New Issue
Block a user