Hiromasa Oku
/
linearMirrorMotion1017
this version 10/17
Fork of linearMirrorMotion by
Diff: laserProjectorHardware/laserProjectorHardware.cpp
- Revision:
- 4:e00e709d7173
- Parent:
- 3:3fe7d6b5cf24
diff -r 3fe7d6b5cf24 -r e00e709d7173 laserProjectorHardware/laserProjectorHardware.cpp --- a/laserProjectorHardware/laserProjectorHardware.cpp Thu Oct 04 05:16:25 2012 +0000 +++ b/laserProjectorHardware/laserProjectorHardware.cpp Wed Oct 24 07:17:26 2012 +0000 @@ -14,7 +14,7 @@ DigitalOut Laser_Blue(LASER_BLUE_PIN); void HardwareIO::init(void) { - Laser_Red = 0; // note: this is not the lockin-laser! + Laser_Red = 1; // note: this is not the lockin-laser! it is also negated Laser_Green = 0; Laser_Blue = 0; @@ -39,8 +39,8 @@ if(value > MAX_AD_MIRRORS) value = MAX_AD_MIRRORS; if(value < MIN_AD_MIRRORS) value = MIN_AD_MIRRORS; - value |= 0x7000; - value &= 0x7FFF; + value |= 0xF000; + value &= 0xFFFF; csDAC = 0; spiDAC.write(value); @@ -52,8 +52,8 @@ if(value > MAX_AD_MIRRORS) value = MAX_AD_MIRRORS; if(value < MIN_AD_MIRRORS) value = MIN_AD_MIRRORS; - value |= 0xF000; - value &= 0xFFFF; + value |= 0x7000; + value &= 0x7FFF; csDAC = 0; spiDAC.write(value); @@ -62,10 +62,10 @@ void HardwareIO::setRedPower(int powerValue){ if(powerValue > 0){ - Laser_Red = 1; + Laser_Red = 0; // att! it's negated... } else{ - Laser_Red = 0; + Laser_Red = 1; } } void HardwareIO::setGreenPower(int powerValue){