Rev 353 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 353 | Rev 363 | ||
|---|---|---|---|
| Line 2... | Line 2... | ||
| 2 | * |
2 | * |
| 3 | * Main application |
3 | * Main application |
| 4 | * |
4 | * |
| 5 | ********************************************************************* |
5 | ********************************************************************* |
| 6 | * FileName: $HeadURL: https://svn.auml.se/svn/HomeAutomation/trunk/EmbeddedSoftware/PIC/canTemp/Source/Main.c $ |
6 | * FileName: $HeadURL: https://svn.auml.se/svn/HomeAutomation/trunk/EmbeddedSoftware/PIC/canTemp/Source/Main.c $ |
| 7 | * Last changed: $LastChangedDate: 2007-03- |
7 | * Last changed: $LastChangedDate: 2007-03-13 18:29:20 +0100 (Tue, 13 Mar 2007) $ |
| 8 | * By: $LastChangedBy: johboh $ |
8 | * By: $LastChangedBy: johboh $ |
| 9 | * Revision: $Revision: |
9 | * Revision: $Revision: 363 $ |
| 10 | ********************************************************************/ |
10 | ********************************************************************/ |
| 11 | 11 | ||
| 12 | #include <compiler.h> |
12 | #include <compiler.h> |
| 13 | #include <stackTasks.h> |
13 | #include <stackTasks.h> |
| 14 | #include <Tick.h> |
14 | #include <Tick.h> |
| Line 176... | Line 176... | ||
| 176 | 176 | ||
| 177 | void canParse(CAN_PACKET cp) |
177 | void canParse(CAN_PACKET cp) |
| 178 | { |
178 | { |
| 179 | #ifdef USE_BLINDS |
179 | #ifdef USE_BLINDS |
| 180 | if (cp.pgm.class==pcACTUATOR && cp.pgm.id==patBLIND_TR) |
180 | if (cp.pgm.class==pcACTUATOR && cp.pgm.id==patBLIND_TR) |
| - | 181 | { |
|
| - | 182 | if (cp.data[1]==0x1) |
|
| - | 183 | { |
|
| - | 184 | signed char pre = (signed char)blindsGetPrecent()+(signed char)cp.data[0]; |
|
| - | 185 | blindsTurn((pre<0?0:pre)); |
|
| - | 186 | } |
|
| - | 187 | else if (cp.data[1]==0x0) |
|
| 181 | { |
188 | { |
| 182 | blindsTurn(cp.data[0]); |
189 | blindsTurn(cp.data[0]); |
| - | 190 | } |
|
| 183 | } |
191 | } |
| 184 | #endif |
192 | #endif |
| 185 | } |
193 | } |
| 186 | 194 | ||
| 187 | 195 | ||