diff --git a/firmware/app/tasks/antenna_deployment.c b/firmware/app/tasks/antenna_deployment.c index d22ce032..804353c3 100644 --- a/firmware/app/tasks/antenna_deployment.c +++ b/firmware/app/tasks/antenna_deployment.c @@ -25,7 +25,7 @@ * * \author Gabriel Mariano Marcelino * - * \version 0.10.7 + * \version 0.8.39 * * \date 2021/11/17 * @@ -55,7 +55,7 @@ void vTaskAntennaDeployment(void) for(i = initial_hib_time_counter; i < CONFIG_ANTENNA_DEPLOYMENT_HIBERNATION_MIN; i++) { - vTaskDelay(pdMS_TO_TICKS(60000U)); + vTaskDelay(pdMS_TO_TICKS(60*1000)); sat_data_buf.obdh.data.initial_hib_time_count++; } @@ -84,7 +84,7 @@ void vTaskAntennaDeployment(void) sys_log_new_line(); } - sat_data_buf.obdh.data.ant_deployment_executed = true; + sat_data_buf.obdh.data.ant_deployment_counter = true; sat_data_buf.obdh.data.ant_deployment_counter++; } @@ -95,9 +95,6 @@ void vTaskAntennaDeployment(void) sys_log_print_msg(")"); sys_log_new_line(); } - - /* Startup task status = Done */ - vTaskSuspend(xTaskAntennaDeploymentHandle); } /** \} End of antenna_deployment group */ diff --git a/firmware/app/tasks/system_reset.c b/firmware/app/tasks/system_reset.c index de995997..31358b73 100644 --- a/firmware/app/tasks/system_reset.c +++ b/firmware/app/tasks/system_reset.c @@ -1,7 +1,7 @@ /* * system_reset.c * - * Copyright The OBDH 2.0 Contributors. + * Copyright (C) 2021, SpaceLab. * * This file is part of OBDH 2.0. * @@ -25,7 +25,7 @@ * * \author Gabriel Mariano Marcelino * - * \version 0.10.7 + * \version 0.7.47 * * \date 2020/01/12 * @@ -44,7 +44,7 @@ void vTaskSystemReset(void) { while(1) { - vTaskDelay(pdMS_TO_TICKS_64(TASK_SYSTEM_RESET_PERIOD_MS)); + vTaskDelay(pdMS_TO_TICKS(TASK_SYSTEM_RESET_PERIOD_MS)); sys_log_print_event_from_module(SYS_LOG_INFO, TASK_SYSTEM_RESET_NAME, "Restarting the system..."); sys_log_new_line(); diff --git a/firmware/app/tasks/system_reset.h b/firmware/app/tasks/system_reset.h index cf9b6651..9f29321d 100644 --- a/firmware/app/tasks/system_reset.h +++ b/firmware/app/tasks/system_reset.h @@ -1,7 +1,7 @@ /* * system_reset.h * - * Copyright The OBDH 2.0 Contributors. + * Copyright (C) 2021, SpaceLab. * * This file is part of OBDH 2.0. * @@ -25,7 +25,7 @@ * * \author Gabriel Mariano Marcelino * - * \version 0.10.7 + * \version 0.7.48 * * \date 2020/01/12 * @@ -45,8 +45,6 @@ #define TASK_SYSTEM_RESET_PRIORITY 2 /**< Task priority. */ #define TASK_SYSTEM_RESET_PERIOD_MS (1000UL*60U*60U*10U) /**< Task period in milliseconds. */ -#define pdMS_TO_TICKS_64( xTimeInMs ) ( ( TickType_t ) ( ( ( TickType_t ) ( xTimeInMs ) * ( TickType_t ) configTICK_RATE_HZ ) / ( TickType_t ) 1000 ) ) - /** * \brief Periodic system reset handle. */ diff --git a/firmware/devices/antenna/antenna.c b/firmware/devices/antenna/antenna.c index 618da4d5..b146fb3f 100644 --- a/firmware/devices/antenna/antenna.c +++ b/firmware/devices/antenna/antenna.c @@ -25,7 +25,7 @@ * * \author Gabriel Mariano Marcelino * - * \version 0.10.7 + * \version 0.10.2 * * \date 2019/11/01 * @@ -201,7 +201,7 @@ int antenna_deploy(uint32_t timeout_ms) } /* Sequential deployment */ - sys_log_print_event_from_module(SYS_LOG_INFO, ANTENNA_MODULE_NAME, "Trying a sequential deploy..."); + sys_log_print_event_from_module(SYS_LOG_INFO, ANTENNA_MODULE_NAME, "Trying an sequential deploy..."); sys_log_new_line(); if (isis_antenna_start_sequential_deploy(ANTENNA_SEQUENTIAL_DEPLOY_BURN_TIME_SEC) != 0) @@ -240,6 +240,7 @@ int antenna_deploy(uint32_t timeout_ms) err++; } + return err; #else sys_log_print_event_from_module(SYS_LOG_ERROR, ANTENNA_MODULE_NAME, "No driver to read the status!"); sys_log_new_line(); diff --git a/firmware/drivers/isis_antenna/isis_antenna_i2c.c b/firmware/drivers/isis_antenna/isis_antenna_i2c.c index 7846fdd2..bad864d7 100644 --- a/firmware/drivers/isis_antenna/isis_antenna_i2c.c +++ b/firmware/drivers/isis_antenna/isis_antenna_i2c.c @@ -25,7 +25,7 @@ * * \author Gabriel Mariano Marcelino * - * \version 0.10.7 + * \version 0.10.2 * * \date 2021/10/10 * @@ -93,7 +93,7 @@ int isis_antenna_i2c_write(uint8_t *data, uint16_t len) { isis_antenna_delay_ms(1); - if (tca4311a_disable(ants_config) == TCA4311A_READY) + if (tca4311a_disable(ants_config) == TCA4311A_NOT_READY) { err = 0; @@ -148,7 +148,7 @@ int isis_antenna_i2c_read(uint8_t *data, uint16_t len) { isis_antenna_delay_ms(1); - if (tca4311a_disable(ants_config) == TCA4311A_READY) + if (tca4311a_disable(ants_config) == TCA4311A_NOT_READY) { err = 0; diff --git a/firmware/tests/drivers/isis_antenna_test.c b/firmware/tests/drivers/isis_antenna_test.c index 1cabb7d4..a120fa77 100644 --- a/firmware/tests/drivers/isis_antenna_test.c +++ b/firmware/tests/drivers/isis_antenna_test.c @@ -25,7 +25,7 @@ * * \author Gabriel Mariano Marcelino * - * \version 0.10.7 + * \version 0.10.2 * * \date 2021/09/01 * @@ -611,7 +611,7 @@ void write_test(uint8_t *wd, uint16_t wd_len) expect_value(__wrap_tca4311a_disable, config.en_pin, ISIS_ANTENNA_IIC_EN_PIN); expect_value(__wrap_tca4311a_disable, config.ready_pin, ISIS_ANTENNA_IIC_RDY_PIN); - will_return(__wrap_tca4311a_disable, 0); + will_return(__wrap_tca4311a_disable, 1); } void read_test(uint8_t *rd, uint16_t rd_len) @@ -644,7 +644,7 @@ void read_test(uint8_t *rd, uint16_t rd_len) expect_value(__wrap_tca4311a_disable, config.en_pin, ISIS_ANTENNA_IIC_EN_PIN); expect_value(__wrap_tca4311a_disable, config.ready_pin, ISIS_ANTENNA_IIC_RDY_PIN); - will_return(__wrap_tca4311a_disable, 0); + will_return(__wrap_tca4311a_disable, 1); } /** \} End of isis_antenna_test group */