From 692d71abcd583ade2977d4b6012b9c2a6de7d4d8 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Wed, 4 Apr 2018 23:28:09 +0300 Subject: 1. Idle task - test real time usage 2. improve and fix heaters test 3. motor/dancer test preparations --- .../Embedded_SW/Embedded/Modules/Thread/Thread_init.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c') diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c index db32b7ba7..5b0f034f4 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c @@ -12,9 +12,9 @@ #include "thread.h" #define MAX_SYSTEM_DANCERS HARDWARE_DANCER_TYPE__RightDancer+1 -MotorConfigStruc MotorsCfg[MAX_THREAD_MOTORS_NUM]; -InternalWinderConfigStruc InternalWinderCfg; -DancerConfigStruc DancersCfg[MAX_SYSTEM_DANCERS]; +MotorConfigStruc MotorsCfg[MAX_THREAD_MOTORS_NUM]={0}; +InternalWinderConfigStruc InternalWinderCfg = {0}; +DancerConfigStruc DancersCfg[MAX_SYSTEM_DANCERS] = {0}; @@ -47,7 +47,7 @@ uint32_t MotorsConfigMessage(HardwareMotor * request) int Motor_i; Motor_i = request->hardwaremotortype; - if ((Motor_i)&&(Motor_i< MAX_THREAD_MOTORS_NUM)) + if (Motor_i< MAX_THREAD_MOTORS_NUM) { MotorsCfg[Motor_i].id = request->hardwaremotortype; MotorsCfg[Motor_i].minfreq = request->minfrequency; @@ -63,6 +63,7 @@ uint32_t MotorsConfigMessage(HardwareMotor * request) MotorsCfg[Motor_i].kd = request->kd; MotorsCfg[Motor_i].changeslope = request->changeslope; MotorsCfg[Motor_i].hightimeoutusec = request->highlengthmicrosecond; + ThreadInitialTestStub(request); return status; } else return Motor_i; @@ -74,7 +75,7 @@ uint32_t DancerConfigMessage(HardwareDancer * request) int Dancer_i; Dancer_i = request->hardwaredancertype; - if ((Dancer_i)&&(Dancer_igradual; @@ -90,8 +91,8 @@ uint32_t DancerConfigMessage(HardwareDancer * request) uint32_t thread_init(void) { - memset (MotorsCfg,0,sizeof(MotorsCfg)); - memset (&InternalWinderCfg,0,sizeof(InternalWinderConfigStruc)); + //memset (MotorsCfg,0,sizeof(MotorsCfg)); + //memset (&InternalWinderCfg,0,sizeof(InternalWinderConfigStruc)); return OK; } -- cgit v1.3.1