Firenet

Check-in [9c28f31e9a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:[55fd308482] Use board LED
Timelines: family | ancestors | descendants | both | NEWNET
Files: files | file ages | folders
SHA1:9c28f31e9ab3ce5012fcfeb5c0496f3c98c60265
User & Date: jim 2012-01-01 11:52:18
References
2012-01-01
11:52 Tested ticket [55fd308482]: Hardware Use LED on head end board plus 4 other changes artifact: 9b4bd70f65 user: jim
Context
2012-01-02
17:21
Update board design [a4133785ca] check-in: 6639f11792 user: jim tags: NEWNET
2012-01-01
11:52
[55fd308482] Use board LED check-in: 9c28f31e9a user: jim tags: NEWNET
2011-12-31
20:27
Update documentation check-in: e0678bcc6b user: jim tags: NEWNET
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Arduino/apps/HeadEnd/HeadEnd.ino.

18
19
20
21
22
23
24

25
26
27
28
29
30
31
..
35
36
37
38
39
40
41

42
43
44
45
46
47
48
..
89
90
91
92
93
94
95


96
97
98
99
100
101
102
...
187
188
189
190
191
192
193


194
195
196
197
198

199
200
201
202
203
204
205
  	x  Cksumm2
  	
  	Then the XMIT enable is set high and the data transmitted in one
  	batch.
  	XMIT is disabled after transmission.
  
  30-Dec-2011 Initial version [7e720cf520] Inventory problem

*/
//-----------------------------------------------------------------------------
#include <SoftwareSerial.h>
#include "debug.h"

// States during run
#define STATE_IDLE	0
................................................................................
#define STATE_CS2	5

// Pins used

#define PIN_XMIT	13
#define PIN_TX		12
#define PIN_RX		11


// Constants
#define HDR_CHR		':'
#define TRLR_CHR	';'

// Set up second serial port 
SoftwareSerial fnet( PIN_RX,PIN_TX,false );
................................................................................
// -----------------------------------------------------------
		
void setup()
{
  // Set up pins
  pinMode(PIN_XMIT,OUTPUT);
  digitalWrite(PIN_XMIT,0);


  
  // Set up serial ports
  Serial.begin(38400); 
  fnet.begin( 9600 );
  
  // Set up state
  
................................................................................
			case STATE_CS2:	// Store second cksum
							buffer[bufpsn++] = ch;
							
							// Send it out, enable xmit,send & disable
							// and then go to idle
							
							digitalWrite(PIN_XMIT,1);


							for( i=0; i<bufpsn; i++ )
							{
								fnet.write(buffer[i]);
							}
							digitalWrite(PIN_XMIT,0);

							state = STATE_IDLE;
							bufpsn = 0;
							break;
		}
		
		// Add checking here for bad packets
		// just ignore them and drop the







>







 







>







 







>
>







 







>
>





>







18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
..
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
..
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
...
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
  	x  Cksumm2
  	
  	Then the XMIT enable is set high and the data transmitted in one
  	batch.
  	XMIT is disabled after transmission.
  
  30-Dec-2011 Initial version [7e720cf520] Inventory problem
   1-Jan-2012 [55fd308482] Use LED on board
*/
//-----------------------------------------------------------------------------
#include <SoftwareSerial.h>
#include "debug.h"

// States during run
#define STATE_IDLE	0
................................................................................
#define STATE_CS2	5

// Pins used

#define PIN_XMIT	13
#define PIN_TX		12
#define PIN_RX		11
#define PIN_LED		9

// Constants
#define HDR_CHR		':'
#define TRLR_CHR	';'

// Set up second serial port 
SoftwareSerial fnet( PIN_RX,PIN_TX,false );
................................................................................
// -----------------------------------------------------------
		
void setup()
{
  // Set up pins
  pinMode(PIN_XMIT,OUTPUT);
  digitalWrite(PIN_XMIT,0);
  pinMode(PIN_LED,OUTPUT);
  digitalWrite(PIN_LED,1);
  
  // Set up serial ports
  Serial.begin(38400); 
  fnet.begin( 9600 );
  
  // Set up state
  
................................................................................
			case STATE_CS2:	// Store second cksum
							buffer[bufpsn++] = ch;
							
							// Send it out, enable xmit,send & disable
							// and then go to idle
							
							digitalWrite(PIN_XMIT,1);
							digitalWrite(PIN_LED,0);

							for( i=0; i<bufpsn; i++ )
							{
								fnet.write(buffer[i]);
							}
							digitalWrite(PIN_XMIT,0);
							digitalWrite(PIN_LED,1);
							state = STATE_IDLE;
							bufpsn = 0;
							break;
		}
		
		// Add checking here for bad packets
		// just ignore them and drop the