summaryrefslogtreecommitdiff
path: root/pcr-controller/temp_curve.c
diff options
context:
space:
mode:
Diffstat (limited to 'pcr-controller/temp_curve.c')
-rw-r--r--pcr-controller/temp_curve.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/pcr-controller/temp_curve.c b/pcr-controller/temp_curve.c
index f44981f..bf9b309 100644
--- a/pcr-controller/temp_curve.c
+++ b/pcr-controller/temp_curve.c
@@ -24,7 +24,7 @@
extern uint8_t debug_;
-const int16_t temp_margin_ = 8; // 0.5 °C
+const int16_t temp_margin_ = 16; // 1 °C
typedef struct tc_entry tc_entry;
struct tc_entry {
@@ -122,14 +122,14 @@ void tcurve_setRepeatEndPosToLatestEntry(void)
temp_curve_loop_last_ = temp_curve_end_;
}
-void tcurve_printCurve(void)
+void tcurve_printCurve(uint8_t cmd)
{
if (temp_curve_ == 0)
{
- printf("{\"cmd_ok\":false,\"error\":\"No curve set\"}\r\n");
+ printf("{\"cmd\":\"%c\",\"cmd_ok\":false,\"error\":\"No curve set\"}\r\n",cmd);
return;
}
- printf("{\"curve\":[");
+ printf("{\"cmd\":\"%c\",\"curve\":[",cmd);
for (tc_entry *ce = temp_curve_; ; ce=ce->next)
{
printf("{\"temp\":%d,\"duration\":%u,\"is_curr\":%d,\"is_loop_start\":%d,\"is_loop_end\":%d},",
@@ -174,4 +174,4 @@ int16_t tcurve_getTempToSet(int16_t current_temp, uint16_t ticks_elapsed)
//else stay on temperature of last element forever (until reset is called or new elements are added)
}
return temp_curve_current_->target_temp;
-} \ No newline at end of file
+}