Add temperature profile executer and add shell command
This commit is contained in:
		@@ -35,8 +35,6 @@ void oven_driver_set_power(uint8_t power);
 | 
			
		||||
 | 
			
		||||
void oven_driver_disable(void);
 | 
			
		||||
 | 
			
		||||
void oven_pid_ack_errors(void);
 | 
			
		||||
 | 
			
		||||
void oven_pid_init(struct pid_controller *controller_to_copy);
 | 
			
		||||
 | 
			
		||||
void oven_pid_handle(void);
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,52 @@
 | 
			
		||||
/* Reflow Oven Controller
 | 
			
		||||
*
 | 
			
		||||
* Copyright (C) 2021  Mario Hüttel <mario.huettel@gmx.net>
 | 
			
		||||
*
 | 
			
		||||
* This file is part of the Reflow Oven Controller Project.
 | 
			
		||||
*
 | 
			
		||||
* The reflow oven controller is free software: you can redistribute it and/or modify
 | 
			
		||||
* it under the terms of the GNU General Public License version 2 as
 | 
			
		||||
* published by the Free Software Foundation.
 | 
			
		||||
*
 | 
			
		||||
* The Reflow Oven Control Firmware is distributed in the hope that it will be useful,
 | 
			
		||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 | 
			
		||||
* GNU General Public License for more details.
 | 
			
		||||
*
 | 
			
		||||
* You should have received a copy of the GNU General Public License
 | 
			
		||||
* along with the reflow oven controller project.
 | 
			
		||||
* If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef __TEMP_PROFILE_EXECUTER_H__
 | 
			
		||||
#define __TEMP_PROFILE_EXECUTER_H__
 | 
			
		||||
 | 
			
		||||
#include <stdint.h>
 | 
			
		||||
#include <reflow-controller/config-parser/temp-profile-parser.h>
 | 
			
		||||
 | 
			
		||||
#define MAX_PROFILE_LENGTH 50
 | 
			
		||||
 | 
			
		||||
enum tpe_status {
 | 
			
		||||
	TPE_OFF,
 | 
			
		||||
	TPE_RUNNING,
 | 
			
		||||
	TPE_ABORT,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
struct tpe_current_state {
 | 
			
		||||
	enum tpe_status status;
 | 
			
		||||
	float setpoint;
 | 
			
		||||
	uint64_t start_timestamp;
 | 
			
		||||
	uint32_t step;
 | 
			
		||||
	uint32_t profile_steps;
 | 
			
		||||
	enum pl_command_type current_command;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
enum pl_ret_val temp_profile_executer_start(const char *filename);
 | 
			
		||||
 | 
			
		||||
int temp_profile_executer_handle(void);
 | 
			
		||||
 | 
			
		||||
const struct tpe_current_state *temp_profile_executer_status(void);
 | 
			
		||||
 | 
			
		||||
int temp_profile_executer_stop(void);
 | 
			
		||||
 | 
			
		||||
#endif /* __TEMP_PROFILE_EXECUTER_H__ */
 | 
			
		||||
		Reference in New Issue
	
	Block a user