Hepta_Cam&GPS
Fork of CameraC1098 by
Diff: HeptaSerial.cpp
- Revision:
- 3:12659e671bad
- Parent:
- 2:686c7043f5f4
--- a/HeptaSerial.cpp Wed Jul 19 09:20:37 2017 +0000 +++ b/HeptaSerial.cpp Fri Jul 21 10:35:56 2017 +0000 @@ -14,7 +14,7 @@ */ HeptaSerial::HeptaSerial(PinName tx, PinName rx, int baud) : serial(tx, rx) { - serial.baud(baud); + //serial.baud(baud); } /** @@ -613,9 +613,10 @@ void HeptaSerial::Sync(void) { HeptaSerial::ErrorNumber err = HeptaSerial::NoError; - setmbedBaud(HeptaSerial::Baud14400); + serial._baud(14400); err = sync(); - setmbedBaud(HeptaSerial::Baud115200); + //setmbedBaud(HeptaSerial::Baud115200); + //err = sync(); if (HeptaSerial::NoError == err) { printf("[ OK ] : Camera::sync\r\n"); } else { @@ -623,7 +624,7 @@ } } -void HeptaSerial::test_jpeg_snapshot_picture(void) +void HeptaSerial::test_jpeg_snapshot_picture(int CAPTURE_FRAMES) { HeptaSerial::ErrorNumber err = HeptaSerial::NoError; for (int i = 0; i < CAPTURE_FRAMES; i++) { @@ -642,7 +643,7 @@ } } -void HeptaSerial::test_jpeg_snapshot_data(void) +void HeptaSerial::test_jpeg_snapshot_data(int CAPTURE_FRAMES) { HeptaSerial::ErrorNumber err = HeptaSerial::NoError; for (int i = 0; i < CAPTURE_FRAMES; i++) { @@ -664,8 +665,8 @@ void HeptaSerial::initialize(Baud baud,JpegResolution jr) { HeptaSerial::ErrorNumber err = HeptaSerial::NoError;//ErrorNumber define + setmbedBaud(baud); err = init(baud, jr);// - if (HeptaSerial::NoError == err) { printf("[ OK ] : Camera::init\r\n"); } else {