Use the SUUNTO_VYPER_PACKET_SIZE macro.
This commit is contained in:
parent
7747a6d4bd
commit
7f158ff8f6
@ -342,7 +342,7 @@ static int
|
|||||||
suunto_vyper_write_memory_package (vyper *device, int address, const unsigned char data[], unsigned int size)
|
suunto_vyper_write_memory_package (vyper *device, int address, const unsigned char data[], unsigned int size)
|
||||||
{
|
{
|
||||||
// Prepare the command.
|
// Prepare the command.
|
||||||
unsigned char command[37] = {0x06,
|
unsigned char command[SUUNTO_VYPER_PACKET_SIZE + 5] = {0x06,
|
||||||
(address >> 8) & 0xFF, // high
|
(address >> 8) & 0xFF, // high
|
||||||
(address ) & 0xFF, // low
|
(address ) & 0xFF, // low
|
||||||
size, // count
|
size, // count
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user