mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
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:
parent
e80e1bda2c
commit
56e1d2214f
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user