Add check in display code for pin mappings that use the i2c pins for other things

This commit is contained in:
Josh Stewart 2015-05-06 16:13:21 +10:00
parent 08254912de
commit 5f4a12736c
1 changed files with 3 additions and 0 deletions

View File

@ -7,6 +7,9 @@ Adafruit_SSD1306 display(pinDisplayReset);
void initialiseDisplay()
{
//Protection against older pin mappings where the crank/cam signals were on the SDA and SCL pins. This will cause the Arduino to lock hard if you try to initialise i2c devices when a crank signal is coming in
if(pinTrigger == 20 || pinTrigger == 21 || pinTrigger2 == 20 || pinTrigger2 == 21) { return; }
switch(configPage1.displayType)
{
case 1: