aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-07-18 08:01:12 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-07-18 08:01:12 +0300
commite96d9f083aa58b24d2e64cbbec47e638d0ce84a0 (patch)
tree7baaee3b7da358e0e6c754527a31e0bb00f11b2a /Software/Embedded_SW/Embedded
parent722e58ecf23a9d08ff645741fb9644e443639a03 (diff)
downloadTango-e96d9f083aa58b24d2e64cbbec47e638d0ce84a0.tar.gz
Tango-e96d9f083aa58b24d2e64cbbec47e638d0ce84a0.zip
global progress counter, some minor corrections
Diffstat (limited to 'Software/Embedded_SW/Embedded')
-rw-r--r--Software/Embedded_SW/Embedded/Drivers/Motors/Motor.c2
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_init.c2
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c2
-rw-r--r--Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c1
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c12
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h1
-rw-r--r--Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c23
7 files changed, 16 insertions, 27 deletions
diff --git a/Software/Embedded_SW/Embedded/Drivers/Motors/Motor.c b/Software/Embedded_SW/Embedded/Drivers/Motors/Motor.c
index a03d74dce..f5b0a9c58 100644
--- a/Software/Embedded_SW/Embedded/Drivers/Motors/Motor.c
+++ b/Software/Embedded_SW/Embedded/Drivers/Motors/Motor.c
@@ -473,6 +473,6 @@ uint32_t MotorMovetoLimitSwitch (TimerMotors_t _motorId,bool direction, uint32_t
MotorMovetoLimitSwitchControlId[_motorId] = AddControlCallback( MotorMoveToLimitSwitchCallBackFunction, eOneMillisecond , FPGA_Read_limit_Switches,(IfTypeMotors*0x100+_motorId), LimitSwitchId, 0 );
MotorMovetoLimitSwitchCallback[_motorId] = callback;
- return MotorMoveControlId;
+ return OK;
}
diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_init.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_init.c
index 047500c19..452643ed3 100644
--- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_init.c
+++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_init.c
@@ -351,7 +351,7 @@ uint32_t HeaterRecalculateSharedHeatersParams(uint32_t deviceId, uint32_t new_ou
Heater1000Slices = HeaterControl[HARDWARE_PID_CONTROL_TYPE__DryerHeater1000w].outputproportionalpowerlimit * NumberOFSlicesInUse / 100;
Heater200aSlices = HeaterControl[HARDWARE_PID_CONTROL_TYPE__DryerHeater200w1].outputproportionalpowerlimit * NumberOFSlicesInUse / 100;
-#warning temporary disable time slice control as we are working with one heater in run time
+//#warning temporary disable time slice control as we are working with one heater in run time
/* if ((Heater1000Slices + Heater200aSlices +2)>NumberOFSlicesInUse)
{
LOG_ERROR (NumberOFSlicesInUse, "proportional time slices too high too high");
diff --git a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c
index fd828ddb2..e18884ccd 100644
--- a/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/Heaters/Heaters_print.c
@@ -46,7 +46,7 @@ HeaterCommand HeaterCmd[MAX_HEATERS_NUM];
uint32_t ControlIdtoHeaterId [MAX_HEATERS_NUM] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
uint32_t DryerHeaterMaxTempControl = 0xFF;
#warning the PT100 id for the dryer control is number2 - dryer internal ambient sensor.
-#warning the PT100 for head 4 is number 5
+
uint32_t HeaterId2PT100Id[MAX_HEATERS_NUM] = {TEMP_SENSE_ANALOG_DRYER_TEMP2,TEMP_SENSE_ANALOG_DRYER_TEMP1,TEMP_SENSE_ANALOG_DRYER_TEMP3,TEMP_SENSE_ANALOG_DYEINGH_TEMP1,TEMP_SENSE_ANALOG_DYEINGH_TEMP2,TEMP_SENSE_ANALOG_DYEINGH_TEMP3,TEMP_SENSE_ANALOG_DYEINGH_TEMP4,TEMP_SENSE_ANALOG_DYEINGH_TEMP5,TEMP_SENSE_ANALOG_MIXCHIP_TEMP,TEMP_SENSE_ANALOG_MIXCHIP_TEMP};
uint32_t DryerInternalPT100Id = TEMP_SENSE_ANALOG_DRYER_TEMP3;
bool HeatersRestart = false;
diff --git a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
index e3c5a5c6f..af3005a18 100644
--- a/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
+++ b/Software/Embedded_SW/Embedded/Modules/IDS/IDS_print.c
@@ -134,7 +134,6 @@ void DispenserPrepareReady(void)
DispenserControlConfig[Motor_i].m_SetParam = 0;//need to update SetParams on presegment stage
MotorSetDirection((TimerMotors_t)HW_Motor_Id,MotorsCfg[HW_Motor_Id].directionthreadwize); //set the dispenser to the
-#warning activate valve
/*Start the dispensers to build initial pressure
* check different handling for dispensers that participate in the first segment and idle dispensers
* start control for initial pressure
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
index a8ca46574..0ec10a072 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
@@ -183,7 +183,7 @@ uint32_t CalculateNumberOfSteps (uint32_t Counter, bool direction)
}
}
- return CalculateNumberOfSteps;
+ return NumberOfSteps;
}
uint32_t ScrewDirectionChange(uint32_t deviceID, uint32_t BusyFlag)
@@ -225,7 +225,7 @@ uint32_t WinderPresegmentReady(uint32_t deviceID, uint32_t ReadValue)
uint32_t Winder_Presegment(void *JobDetails, uint32_t SegmentId)
{
- JobTicket* JobTicket = JobDetails;
+ //JobTicket* JobTicket = JobDetails;
float screw_speed = 0;
float RotationsPerSecond;
@@ -280,18 +280,18 @@ uint32_t Winder_End(void)
}
void Winder_ScrewHomeLimitSwitchInterrupt(void)
{
- uint32_t status;
+ //uint32_t status;
//handle glitch - send information to the next time that the motor stops
if (Winder_ScrewHoming)
{
MotorStop(HARDWARE_MOTOR_TYPE__MOTO_SCREW,Hard_Hiz); //stop ASAP
}
- status = MotorSetDirection(HARDWARE_MOTOR_TYPE__MOTO_SCREW,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize);//make sure to move the cart out
+ MotorSetDirection(HARDWARE_MOTOR_TYPE__MOTO_SCREW,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize);//make sure to move the cart out
}
void Winder_ScrewOutLimitSwitchInterrupt(void)
{
//handle glitch - send information to the next time that the motor stops
- uint32_t status;
- status = MotorSetDirection(HARDWARE_MOTOR_TYPE__MOTO_SCREW,1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize);//make sure to move the cart out
+ //uint32_t status;
+ MotorSetDirection(HARDWARE_MOTOR_TYPE__MOTO_SCREW,1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize);//make sure to move the cart out
}
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h
index 56e88204f..df88da8c8 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h
@@ -11,6 +11,7 @@
#define FEEDER_DANCER HARDWARE_DANCER_TYPE__RightDancer
#define NUM_OF_DANCERS HARDWARE_DANCER_TYPE__RightDancer+1
//} DANCER_ENUM;
+extern double TotalProcessedLength;
uint32_t InternalWindingConfigMessage(JobSpool* request);
diff --git a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c
index fc327fd75..d33cb0265 100644
--- a/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c
+++ b/Software/Embedded_SW/Embedded/StateMachines/Printing/JobSTM.c
@@ -280,7 +280,6 @@ static ReturnCode ExitState(void *JobDetails)
//********************************************************************************************************************
void JobAbortFunc(MessageContainer* requestContainer)
{
- uint32_t status = NOT_SUPPORTED;
MessageContainer responseContainer;
uint8_t* container_buffer;
@@ -395,7 +394,6 @@ void JobRequestFunc(MessageContainer* requestContainer)
//char logmsg[150];
void SendJobProgress(double ProcessedLength, int SegmentId, bool done, char *Message)
{
- uint32_t status = NOT_SUPPORTED;
MessageContainer responseContainer;
uint8_t* container_buffer;
@@ -414,21 +412,12 @@ void SendJobProgress(double ProcessedLength, int SegmentId, bool done, char *Mes
jobStatus.message = Message;
- if (ProcessedLength == 0.0)
- {
- //ProcessedLength = previousJobLength;
- jobStatus.has_progress = false;
- jobStatus.progress = 0;
- jobStatus.has_currentsegmentindex = false;
- }
- else
- {
- //previousJobLength = ProcessedLength;
- jobStatus.has_progress = true;
- jobStatus.progress = ProcessedLength;
- jobStatus.has_currentsegmentindex = true;
- jobStatus.currentsegmentindex = SegmentId;
- }
+ //previousJobLength = ProcessedLength;
+ jobStatus.has_progress = true;
+ jobStatus.progress = TotalProcessedLength;
+ jobStatus.has_currentsegmentindex = true;
+ jobStatus.currentsegmentindex = SegmentId;
+
response.status = &jobStatus;
if (done == true)