Changeset 374 for asp3_tinet_ecnl_arm/trunk/app4_aircon/src
- Timestamp:
- Apr 5, 2019, 9:26:53 PM (5 years ago)
- Location:
- asp3_tinet_ecnl_arm/trunk/app4_aircon/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
asp3_tinet_ecnl_arm/trunk/app4_aircon/src/echonet_main.c
r364 r374 1091 1091 static uint8_t main_read_button(analogin_t *obj) 1092 1092 { 1093 float a = analogin_read(obj);1094 1095 a *= 5 .0;1093 int a = analogin_read_u16(obj); 1094 1095 a *= 5; 1096 1096 1097 1097 //printf("Button read analog = %f\r\n",a); 1098 if (a < 0.2)1098 if (a < (int)(0.2 * 65536)) 1099 1099 return BUTTON_DOWN; 1100 if (a < 1.0)1100 if (a < (int)(1.0 * 65536)) 1101 1101 return BUTTON_RIGHT; 1102 if (a < 1.7)1102 if (a < (int)(1.7 * 65536)) 1103 1103 return BUTTON_SELECT; 1104 if (a < 2.6)1104 if (a < (int)(2.6 * 65536)) 1105 1105 return BUTTON_UP; 1106 if (a < 4.6)1106 if (a < (int)(4.6 * 65536)) 1107 1107 return BUTTON_LEFT; 1108 1108 else -
asp3_tinet_ecnl_arm/trunk/app4_aircon/src/main.c
r364 r374 67 67 #include "core/ntshell.h" 68 68 #include "core/ntlibc.h" 69 #include "util/ntstdio.h"69 #include <stdio.h> 70 70 #include "usrcmd.h" 71 71 #include "util/ntopt.h" … … 183 183 { 184 184 FILINFO fno; 185 #if _USE_LFN186 char lfn[ _MAX_LFN + 1];185 #if FF_USE_LFN 186 char lfn[FF_MAX_LFN + 1]; 187 187 fno.lfname = lfn; 188 fno.lfsize = _MAX_LFN + 1;188 fno.lfsize = FF_MAX_LFN + 1; 189 189 #endif 190 190 ER ret; 191 191 192 #ifdef TOPPERS_OMIT_TECS 193 serial_opn_por(SIO_PORTID); 194 #endif 195 serial_ctl_por(SIO_PORTID, IOCTL_FCSND | IOCTL_FCRCV); 196 197 ntshell_task_init(uart_read, uart_write, &main_obj); 192 ntshell_task_init(SIO_PORTID); 198 193 199 194 main_obj.timer = TMO_FEVR; -
asp3_tinet_ecnl_arm/trunk/app4_aircon/src/main.cfg
r364 r374 51 51 52 52 INCLUDE("tecsgen.cfg"); 53 INCLUDE("mbed_stub.cfg"); 53 54 54 55 INCLUDE("tinet/tinet_asp.cfg");
Note:
See TracChangeset
for help on using the changeset viewer.