Mirror with some correction
Dependencies: mbed FastIO FastPWM USBDevice
Diff: main.cpp
- Revision:
- 45:c42166b2878c
- Parent:
- 44:b5ac89b9cd5d
- Child:
- 47:df7a88cd249c
--- a/main.cpp Sun Feb 07 03:07:11 2016 +0000 +++ b/main.cpp Mon Feb 15 20:30:32 2016 +0000 @@ -2326,8 +2326,12 @@ // to distinguish special request reply packets. uint16_t statusFlags; -// flag: send a pixel dump after the next read +// Pixel dump mode - the host requested a dump of image sensor pixels +// (helpful for installing and setting up the sensor and light source) bool reportPix = false; +uint8_t reportPixMode; // pixel report mode bits: + // 0x01 -> raw pixels (0) / processed (1) + // 0x02 -> high res scan (0) / low res (1) // --------------------------------------------------------------------------- @@ -2508,8 +2512,11 @@ case 3: // 3 = pixel dump - // (No parameters) + // data[2] = mode bits: + // 0x01 -> return processed pixels (default is raw pixels) + // 0x02 -> low res scan (default is high res scan) reportPix = true; + reportPixMode = data[2]; // show purple until we finish sending the report diagLED(1, 0, 1); @@ -3390,7 +3397,7 @@ if (reportPix) { // send the report - plungerSensor->sendExposureReport(js); + plungerSensor->sendExposureReport(js, reportPixMode); // we have satisfied this request reportPix = false;