aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2019-03-19 18:44:37 +0200
committerAvi Levkovich <avi@twine-s.com>2019-03-19 18:44:37 +0200
commit9ebd205980f2203339b2dca2a92038dc06d0f43e (patch)
tree84f1cf2668ec5a0fce0930832e011b6cf40a1c2a /Software/Embedded_SW
parent8a484dde0e0f082f0e70ecea4c930a81aee29927 (diff)
parent69a41da59eb41a681e644505d5e7814c2c4f6973 (diff)
downloadTango-9ebd205980f2203339b2dca2a92038dc06d0f43e.tar.gz
Tango-9ebd205980f2203339b2dca2a92038dc06d0f43e.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Embedded_SW')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c8
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h1
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c6
3 files changed, 13 insertions, 2 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
index 8e4a36e62..88877f113 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
@@ -85,7 +85,7 @@ uint32_t Dancer_Data[NUM_OF_DANCERS] = {0};
float Speed_Data = 0;
uint32_t DrawerFansStatus = 0;
uint32_t SystemFansStatus = 0;
-
+uint8_t Gas_PPM = 0;
bool watchdogCriticalAlarm = false;
@@ -514,6 +514,7 @@ uint32_t MillisecLowLoop(uint32_t tick)
{
Read_Heaters_Current(Heater_i);
}
+ Gas_PPM = Calculate_Gas_Power_Consumption();
}
if (OneMinute_Tick)
{
@@ -621,6 +622,11 @@ uint32_t getDrawerFansStatus(void)
{
return DrawerFansStatus;
}
+uint8_t getGasReading(void)
+{
+ return Gas_PPM;
+}
+
uint32_t getSystemFansStatus(void)
{
return SystemFansStatus;
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h
index 7e2af1079..064302685 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h
+++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h
@@ -32,6 +32,7 @@ uint32_t getADCData(int DeviceId);
float getSensorSpeedData(void);
uint32_t getDrawerFansStatus(void);
uint32_t getSystemFansStatus(void);
+uint8_t getGasReading(void);
void MillisecInit(void);
void MillisecStop(void);
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
index ddcba57bc..d8a96a4d9 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
@@ -418,6 +418,7 @@ void ScrewsStartControlTimer (void)
return;
}
+int random = 0;
void ScrewTimerInterrupt(int ARG0)
{
ROM_TimerIntClear(Screw_timerBase, TIMER_TIMA_TIMEOUT); // Clear the timer interrupt
@@ -427,7 +428,7 @@ void ScrewTimerInterrupt(int ARG0)
{
ROM_TimerLoadSet(Screw_timerBase, TIMER_A,(int)ScrewRunningTime);
MotorSetDirection (HARDWARE_MOTOR_TYPE__MOTO_SCREW, ScrewCurrentDirection);
- MotorSetSpeedDirect(HARDWARE_MOTOR_TYPE__MOTO_SCREW,ScrewSpeed);
+ MotorSetSpeedDirect(HARDWARE_MOTOR_TYPE__MOTO_SCREW,ScrewSpeed+random);
ScrewChangeCounter = 0;
ScrewChangeLimit = ScrewRunningTime/12000000;
ScrewDirectionChangeCounter++;
@@ -437,6 +438,9 @@ void ScrewTimerInterrupt(int ARG0)
TimerDisable(Screw_timerBase, TIMER_A);
}
ROM_IntMasterEnable();
+ random++;
+ if (random >= 2)
+ random = -1;
//Report("ScrewTimerInterrupt dir, duration, speed", __FILE__,ScrewCurrentDirection,ScrewRunningTime, RpMessage, ScrewSpeed, 0);
//
// Enable all interrupts.