Skip to content

Commit

Permalink
Revert "Merge pull request from aldebaran_mission, closes #334, fix #331
Browse files Browse the repository at this point in the history
"
  • Loading branch information
miguelboing authored Oct 5, 2023
1 parent b6a1d9c commit 128a587
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 21 deletions.
9 changes: 3 additions & 6 deletions firmware/app/tasks/antenna_deployment.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* \author Gabriel Mariano Marcelino <[email protected]>
*
* \version 0.10.7
* \version 0.8.39
*
* \date 2021/11/17
*
Expand Down Expand Up @@ -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++;
}
Expand Down Expand Up @@ -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++;
}
Expand All @@ -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 */
6 changes: 3 additions & 3 deletions firmware/app/tasks/system_reset.c
Original file line number Diff line number Diff line change
@@ -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.
*
Expand All @@ -25,7 +25,7 @@
*
* \author Gabriel Mariano Marcelino <[email protected]>
*
* \version 0.10.7
* \version 0.7.47
*
* \date 2020/01/12
*
Expand All @@ -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();
Expand Down
6 changes: 2 additions & 4 deletions firmware/app/tasks/system_reset.h
Original file line number Diff line number Diff line change
@@ -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.
*
Expand All @@ -25,7 +25,7 @@
*
* \author Gabriel Mariano Marcelino <[email protected]>
*
* \version 0.10.7
* \version 0.7.48
*
* \date 2020/01/12
*
Expand All @@ -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.
*/
Expand Down
5 changes: 3 additions & 2 deletions firmware/devices/antenna/antenna.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* \author Gabriel Mariano Marcelino <[email protected]>
*
* \version 0.10.7
* \version 0.10.2
*
* \date 2019/11/01
*
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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();
Expand Down
6 changes: 3 additions & 3 deletions firmware/drivers/isis_antenna/isis_antenna_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* \author Gabriel Mariano Marcelino <[email protected]>
*
* \version 0.10.7
* \version 0.10.2
*
* \date 2021/10/10
*
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions firmware/tests/drivers/isis_antenna_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* \author Gabriel Mariano Marcelino <[email protected]>
*
* \version 0.10.7
* \version 0.10.2
*
* \date 2021/09/01
*
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 */

0 comments on commit 128a587

Please sign in to comment.