Fixed code for PlatformIO

This commit is contained in:
Mark van Renswoude 2017-11-27 15:51:32 +01:00
parent 3d68f483ce
commit bd7a616e2b
5 changed files with 33 additions and 25 deletions

2
.gitignore vendored
View File

@ -1 +1,3 @@
*.sublime-workspace
.pioenvs
.piolibdeps

View File

@ -10,11 +10,15 @@
[env:attiny85]
platform = atmelavr
board = atmega328p
board = pro16MHzatmega328
framework = arduino
upload_protocol = stk500v1
upload_flags = -P$UPLOAD_PORT -b$UPLOAD_SPEED
board_f_cpu = 1000000L
lib_deps =
Bounce2
Encoder
upload_port = COM7
upload_speed = 19200

View File

@ -46,7 +46,7 @@ void ScreenCountdown::onEncoder(long lastPosition, long newPosition)
void ScreenCountdown::onTick()
{
int elapsed = (getCurrentTime() - ExposureTimerStart) / 1000;
long elapsed = (getCurrentTime() - ExposureTimerStart) / 1000;
if (elapsed >= ExposureTime)
{

View File

@ -26,6 +26,8 @@ class BaseScreen
mScreenManager = screenManager;
}
virtual ~BaseScreen() {}
virtual void onShow() = 0;
virtual void onHide() = 0;
@ -69,7 +71,7 @@ class ScreenManager
}
template<class T> void ScreenManager::show()
template<class T> void show()
{
if (mCurrent != NULL)
{

View File

@ -1,7 +1,7 @@
#include <Arduino.h>
#include <Bounce2.h>
#include <Encoder.h>
#include <LiquidCrystal.h>
#include <EEPROM.h>
#include "Config.h"
#include "ScreenManager.h"
#include "ScreenSetTime.h"