diff --git a/src/grovescam/grovescam.cxx b/src/grovescam/grovescam.cxx index 11f216b3..53bd2c01 100644 --- a/src/grovescam/grovescam.cxx +++ b/src/grovescam/grovescam.cxx @@ -248,7 +248,7 @@ bool GROVESCAM::preCapture(PIC_FORMATS_T fmt) { const unsigned int pktLen = 6; uint8_t cmd[pktLen] = { 0xaa, static_cast(0x01 | m_camAddr), 0x00, - 0x07, 0x00, fmt }; + 0x07, 0x00, static_cast(fmt) }; uint8_t resp[pktLen]; int retries = 0; @@ -285,8 +285,8 @@ bool GROVESCAM::doCapture() { const unsigned int pktLen = 6; uint8_t cmd[pktLen] = { 0xaa, static_cast(0x06 | m_camAddr), 0x08, - MAX_PKT_LEN & 0xff, - (MAX_PKT_LEN >> 8) & 0xff, 0}; + static_cast(MAX_PKT_LEN & 0xff), + static_cast((MAX_PKT_LEN >> 8)) & 0xff, 0}; uint8_t resp[pktLen]; int retries = 0;