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