aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Control
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-04-11 14:14:36 +0300
committerShlomo Hecht <shlomo@twine-s.com>2019-04-11 14:14:36 +0300
commit6f8e84556dc6a4dcae9598df0685d81ea255269f (patch)
tree0b0c9871cda349e238ad1cc4b8d2b133cfed0e24 /Software/Embedded_SW/Embedded/Modules/Control
parent50672cf57739bac3c0ddefcd40563d0fbed3db80 (diff)
downloadTango-6f8e84556dc6a4dcae9598df0685d81ea255269f.tar.gz
Tango-6f8e84556dc6a4dcae9598df0685d81ea255269f.zip
bug fix in control (uint16 timimg - not good for large segments) and heaters (increase band, handle job end)
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/control.c4
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/control.h5
2 files changed, 5 insertions, 4 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.c b/Software/Embedded_SW/Embedded/Modules/Control/control.c
index 52b52d93b..608d17a7b 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/control.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/control.c
@@ -69,7 +69,7 @@ typedef struct
uint32_t StartTick;
DataReadCBFunction ControlDataReadPtr;
ControlCBFunction ControlCallbackPtr;
- uint16_t ControlTiming;
+ uint32_t ControlTiming;
}ControlDeviceStruc;
typedef enum
@@ -224,7 +224,7 @@ void ControlStart(void)
* both these callbacks can be removed. if a new call is arriving, it invalidates the previous one (no dual control or data)
*
***************************************************************************************************************************************************/
-uint32_t AddControlCallback( ControlCBFunction Callback, CTRL_TIMING_ENUM CtrlFrequency, DataReadCBFunction DriverfPtr, uint16_t IfIndex, uint32_t Parameter1, uint32_t Parameter2 )
+uint32_t AddControlCallback( ControlCBFunction Callback, uint32_t CtrlFrequency, DataReadCBFunction DriverfPtr, uint16_t IfIndex, uint32_t Parameter1, uint32_t Parameter2 )
{
assert(Callback);
assert(DriverfPtr);
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.h b/Software/Embedded_SW/Embedded/Modules/Control/control.h
index 8d7e219ac..380040e34 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/control.h
+++ b/Software/Embedded_SW/Embedded/Modules/Control/control.h
@@ -19,7 +19,8 @@ typedef enum {
eTenMillisecond = 10,
eHundredMillisecond = 100,
eOneSecond = 1000,
- eOneMinute = 60000
+ eOneMinute = 60000,
+ eOneHour = 3600000
}CTRL_TIMING_ENUM;
typedef enum
{
@@ -37,7 +38,7 @@ typedef enum
void ControlInit(void);
void ControlStop(void);
void ControlStart(void);
-uint32_t AddControlCallback( ControlCBFunction Callback, CTRL_TIMING_ENUM CtrlFrequency, DataReadCBFunction DriverfPtr, uint16_t IfIndex, uint32_t Parameter1, uint32_t Parameter2 );
+uint32_t AddControlCallback( ControlCBFunction Callback, uint32_t CtrlFrequency, DataReadCBFunction DriverfPtr, uint16_t IfIndex, uint32_t Parameter1, uint32_t Parameter2 );
int RemoveControlCallback(uint32_t deviceId, ControlCBFunction Callback );
//The safe remove command can be used ONLY when called from the control callback itself
int SafeRemoveControlCallback(uint32_t deviceId , ControlCBFunction Callback);