Browse Source

Try to display TemperatureSetpoint.

Vladimir N. Shilov 3 years ago
parent
commit
d34d0a2bc3
2 changed files with 32 additions and 31 deletions
  1. 28 28
      Dryer.layout
  2. 4 3
      src/main.c

+ 28 - 28
Dryer.layout

@@ -2,74 +2,74 @@
 <CodeBlocks_layout_file>
 	<FileVersion major="1" minor="0" />
 	<ActiveTarget name="Debug" />
-	<File name="lib\ssd1306xled\ssd1306xledtx.c" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="lib\rtos\rtos.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="2518" topLine="50" />
+			<Cursor1 position="2098" topLine="0" />
 		</Cursor>
 	</File>
-	<File name="lib\tinyavrlib\num2str.c" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="lib\ssd1306xled\font8x16.h" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="2700" topLine="43" />
+			<Cursor1 position="1017" topLine="24" />
 		</Cursor>
 	</File>
-	<File name="src\main.c" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="lib\rtos\rtos.c" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="1135" topLine="36" />
+			<Cursor1 position="4343" topLine="110" />
 		</Cursor>
 	</File>
-	<File name="lib\ssd1306xled\ssd1306xled.h" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="src\main.c" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="1177" topLine="0" />
+			<Cursor1 position="1354" topLine="42" />
 		</Cursor>
 	</File>
-	<File name="src\i2c.c" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="lib\ssd1306xled\ssd1306xled.h" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="1062" topLine="33" />
+			<Cursor1 position="1177" topLine="0" />
 		</Cursor>
 	</File>
-	<File name="src\sensor.c" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="inc\sensor.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="951" topLine="68" />
+			<Cursor1 position="390" topLine="0" />
 		</Cursor>
 	</File>
-	<File name="lib\rtos\rtos.c" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="inc\main.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="4343" topLine="110" />
+			<Cursor1 position="2252" topLine="56" />
 		</Cursor>
 	</File>
-	<File name="lib\ssd1306xled\ssd1306xled.c" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="lib\ssd1306xled\ssd1306xledtx.c" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="5259" topLine="131" />
+			<Cursor1 position="2518" topLine="50" />
 		</Cursor>
 	</File>
-	<File name="lib\ssd1306xled\font8x16.h" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="inc\i2c.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="1017" topLine="24" />
+			<Cursor1 position="88" topLine="0" />
 		</Cursor>
 	</File>
-	<File name="inc\sensor.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="lib\ssd1306xled\ssd1306xledtx.h" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="390" topLine="0" />
+			<Cursor1 position="951" topLine="0" />
 		</Cursor>
 	</File>
-	<File name="lib\ssd1306xled\ssd1306xledtx.h" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="src\i2c.c" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="951" topLine="0" />
+			<Cursor1 position="1062" topLine="33" />
 		</Cursor>
 	</File>
-	<File name="lib\rtos\rtos.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="lib\tinyavrlib\num2str.c" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="2098" topLine="0" />
+			<Cursor1 position="2700" topLine="43" />
 		</Cursor>
 	</File>
-	<File name="inc\i2c.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="src\sensor.c" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="88" topLine="0" />
+			<Cursor1 position="951" topLine="68" />
 		</Cursor>
 	</File>
-	<File name="inc\main.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+	<File name="lib\ssd1306xled\ssd1306xled.c" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
 		<Cursor>
-			<Cursor1 position="2252" topLine="56" />
+			<Cursor1 position="5259" topLine="131" />
 		</Cursor>
 	</File>
 </CodeBlocks_layout_file>

+ 4 - 3
src/main.c

@@ -45,7 +45,6 @@ int main(void) {
   RTOS_SetTask(sensorStart, 50, 1000);
   RTOS_SetTask(sensorGetData, 1050, 1000);
 
-//  ssd1306_clear();
 //  ssd1306_fill2(0xff, 0x00);
   ssd1306_clear();
   ssd1306tx_init(ssd1306xled_font6x8data, 0);
@@ -58,13 +57,15 @@ int main(void) {
   ssd1306tx_stringxy((uint8_t const *)ssd1306xled_font8x16data, 0, 5, "TINUSAUR Project");
   ssd1306_setpos(0, 7);
   ssd1306tx_string("http://tinusaur.org");
-  tdelay_ms(1000);
+  tdelay_ms(2000);
+  ssd1306_clear();
 
   /* Infinity loop */
   do {
   if (Flag.newTempSet != 0) {
     Flag.newTempSet = 0;
-    // do some ...
+    ssd1306_setpos(1, 5);
+    ssd1306tx_numdec(TemperatureSetpoint);
   }
 
     ssd1306_setpos(1, 3);