mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-16 04:05:46 +00:00
Avoid binary integer literals
This commit is contained in:
parent
ec1b600077
commit
f4bdf234e3
@ -30,7 +30,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "edc.h"
|
#include "edc.h"
|
||||||
#include "bits.h"
|
#include "bits.h"
|
||||||
#include "cnav_msg.h"
|
#include "cnav_msg.h"
|
||||||
@ -57,9 +56,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/** GPS L2C preamble */
|
/** GPS L2C preamble */
|
||||||
#define GPS_CNAV_PREAMBLE1 (0b10001011u)
|
const u32 GPS_CNAV_PREAMBLE1 = 0x8Bu; /* (0b10001011u) */
|
||||||
/** Inverted GPS L2C preamble */
|
/** Inverted GPS L2C preamble */
|
||||||
#define GPS_CNAV_PREAMBLE2 (0b01110100u)
|
const u32 GPS_CNAV_PREAMBLE2 = 0x74u; /* (0b01110100u) */
|
||||||
/** GPS L2C preamble length in bits */
|
/** GPS L2C preamble length in bits */
|
||||||
#define GPS_CNAV_PREAMBLE_LENGTH (8)
|
#define GPS_CNAV_PREAMBLE_LENGTH (8)
|
||||||
/** GPS L2C CNAV message length in bits */
|
/** GPS L2C CNAV message length in bits */
|
||||||
@ -201,7 +200,8 @@ static void _cnav_add_symbol(cnav_v27_part_t *part, u8 ch)
|
|||||||
* - M - Number of bits in the tail to ignore.
|
* - M - Number of bits in the tail to ignore.
|
||||||
*/
|
*/
|
||||||
unsigned char tmp_bits[(GPS_L2C_V27_DECODE_BITS + GPS_L2C_V27_DELAY_BITS +
|
unsigned char tmp_bits[(GPS_L2C_V27_DECODE_BITS + GPS_L2C_V27_DELAY_BITS +
|
||||||
CHAR_BIT - 1) / CHAR_BIT];
|
CHAR_BIT - 1) /
|
||||||
|
CHAR_BIT];
|
||||||
|
|
||||||
v27_chainback_likely(&part->dec, tmp_bits,
|
v27_chainback_likely(&part->dec, tmp_bits,
|
||||||
GPS_L2C_V27_DECODE_BITS + GPS_L2C_V27_DELAY_BITS);
|
GPS_L2C_V27_DECODE_BITS + GPS_L2C_V27_DELAY_BITS);
|
||||||
@ -238,7 +238,6 @@ static void _cnav_add_symbol(cnav_v27_part_t *part, u8 ch)
|
|||||||
}
|
}
|
||||||
if (part->preamble_seen && GPS_CNAV_MSG_LENGTH <= part->n_decoded)
|
if (part->preamble_seen && GPS_CNAV_MSG_LENGTH <= part->n_decoded)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* We have collected 300 bits starting from message preamble. Now try
|
/* We have collected 300 bits starting from message preamble. Now try
|
||||||
* to compute CRC-24Q */
|
* to compute CRC-24Q */
|
||||||
u32 crc = _cnav_compute_crc(part);
|
u32 crc = _cnav_compute_crc(part);
|
||||||
|
Loading…
Reference in New Issue
Block a user