No bugs noted here.
Signed-off-by: Keith Packard <keithp@keithp.com>
while (ao_fireone_data_pos != ao_data_head) {
ao_fireone_data.tick = (uint16_t) ao_data_ring[ao_fireone_data_pos].tick;
ao_fireone_data.type = AO_LOG_SENSOR;
while (ao_fireone_data_pos != ao_data_head) {
ao_fireone_data.tick = (uint16_t) ao_data_ring[ao_fireone_data_pos].tick;
ao_fireone_data.type = AO_LOG_SENSOR;
- ao_fireone_data.u.sensor.pressure = ao_data_ring[ao_fireone_data_pos].adc.pressure;
- ao_fireone_data.u.sensor.thrust = ao_data_ring[ao_fireone_data_pos].adc.thrust;
+ ao_fireone_data.u.sensor.pressure = (uint16_t) ao_data_ring[ao_fireone_data_pos].adc.pressure;
+ ao_fireone_data.u.sensor.thrust = (uint16_t) ao_data_ring[ao_fireone_data_pos].adc.thrust;
// for (i = 0; i < 4; i++) {
// ao_fireone_data.u.sensor.thermistor[i] = ao_data_ring[ao_fireone_data_pos].sensor.thermistor[i];
// }
// for (i = 0; i < 4; i++) {
// ao_fireone_data.u.sensor.thermistor[i] = ao_data_ring[ao_fireone_data_pos].sensor.thermistor[i];
// }
void
ao_log_micro_data(void)
{
void
ao_log_micro_data(void)
{
- uint16_t low_bits = pa;
+ uint16_t low_bits = (uint16_t) pa;
if (ao_log_offset < MAX_LOG_OFFSET) {
ao_eeprom_write(ao_log_offset, &low_bits, sizeof (low_bits));
if (ao_log_offset < MAX_LOG_OFFSET) {
ao_eeprom_write(ao_log_offset, &low_bits, sizeof (low_bits));
ao_log_hex_nibble(uint8_t b)
{
if (b < 10)
ao_log_hex_nibble(uint8_t b)
{
if (b < 10)
- ao_async_byte('0' + b);
+ ao_async_byte((uint8_t) ('0' + b));
- ao_async_byte('a' - 10 + b);
+ ao_async_byte((uint8_t) ('a' - 10 + b));
if (n_samples == (N_SAMPLES_TYPE) (~0))
n_samples = 0;
if (n_samples == (N_SAMPLES_TYPE) (~0))
n_samples = 0;
- nbytes = STARTING_LOG_OFFSET + sizeof (uint16_t) * n_samples;
+ nbytes = (uint16_t) (STARTING_LOG_OFFSET + sizeof (uint16_t) * n_samples);
/*
* Rewrite n_samples so that it includes the log ID value with
/*
* Rewrite n_samples so that it includes the log ID value with
ao_eeprom_read(b, &byte, 1);
#if AO_LOG_ID
if (N_SAMPLES_OFFSET <= b && b < (N_SAMPLES_OFFSET + sizeof(n_samples))) {
ao_eeprom_read(b, &byte, 1);
#if AO_LOG_ID
if (N_SAMPLES_OFFSET <= b && b < (N_SAMPLES_OFFSET + sizeof(n_samples))) {
- byte = n_samples >> ((b - N_SAMPLES_OFFSET) << 3);
+ byte = (uint8_t) (n_samples >> ((b - N_SAMPLES_OFFSET) << 3));
}
#endif
ao_log_hex(byte);
}
#endif
ao_log_hex(byte);
}
ao_log_newline();
crc = ~crc;
}
ao_log_newline();
crc = ~crc;
- ao_log_hex(crc >> 8);
- ao_log_hex(crc);
+ ao_log_hex((uint8_t) (crc >> 8));
+ ao_log_hex((uint8_t) crc);
ao_log_newline();
ao_async_stop();
}
ao_log_newline();
ao_async_stop();
}