grovescam: fix a couple more narrowing conversions (c++11)

Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Jon Trulson 2016-03-03 16:31:57 -07:00 committed by Mihai Tudor Panu
parent e80e1bda2c
commit 56e1d2214f

View File

@ -248,7 +248,7 @@ bool GROVESCAM::preCapture(PIC_FORMATS_T fmt)
{
const unsigned int pktLen = 6;
uint8_t cmd[pktLen] = { 0xaa, static_cast<uint8_t>(0x01 | m_camAddr), 0x00,
0x07, 0x00, fmt };
0x07, 0x00, static_cast<uint8_t>(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<uint8_t>(0x06 | m_camAddr), 0x08,
MAX_PKT_LEN & 0xff,
(MAX_PKT_LEN >> 8) & 0xff, 0};
static_cast<uint8_t>(MAX_PKT_LEN & 0xff),
static_cast<uint8_t>((MAX_PKT_LEN >> 8)) & 0xff, 0};
uint8_t resp[pktLen];
int retries = 0;