Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
1 files changed, 6 insertions, 5 deletions
-rw-r--r--Year 3/Internet of things/goam/main/ptc06.c11
diff --git a/Year 3/Internet of things/goam/main/ptc06.c b/Year 3/Internet of things/goam/main/ptc06.c
index 34385ef..717019d 100644
--- a/Year 3/Internet of things/goam/main/ptc06.c
+++ b/Year 3/Internet of things/goam/main/ptc06.c
@@ -182,10 +182,10 @@ static void vc0706_system_reset() {
}
enum ControlFlag {
- STOP_CURRENT_FRAME = 0,
- STOP_NEXT_FRAME = 1,
- RESUME_FRAME = 2,
- STEP_FRAME = 3
+ STOP_CURRENT_FRAME = 0x00,
+ STOP_NEXT_FRAME = 0x01,
+ RESUME_FRAME = 0x02,
+ STEP_FRAME = 0x03
};
static void vc0706_fbuf_ctrl(enum ControlFlag cf_byte) {
@@ -294,7 +294,7 @@ void ptc06_reset() {
size_t ptc06_get_image(char** image) {
vc0706_fbuf_ctrl(STOP_CURRENT_FRAME);
- wait(1000);
+ wait(500);
vc0706_get_fbuf_len(CURRENT_FRAME);
char start[4] = { 0x00 };
@@ -302,6 +302,7 @@ size_t ptc06_get_image(char** image) {
size_t length = vc0706_read_fbuf(CURRENT_FRAME, DMA, start, temp_ack + 5, delay, image);
vc0706_fbuf_ctrl(RESUME_FRAME);
+ vc0706_system_reset();
return length;
}