# Firenet

Check-in [4a9ce4e2f6]

Overview
Comment: Update with DOC fixes family | ancestors | descendants | both | NEWNET files | file ages | folders 4a9ce4e2f6252d201621e3d8ac0425bac5098e2b jim 2013-02-17 12:25:50
Context
 2013-02-18 10:50 Getting ready for movie check-in: 4c4d2dad94 user: jim tags: NEWNET 2013-02-17 12:25 Update with DOC fixes check-in: 4a9ce4e2f6 user: jim tags: NEWNET 2013-02-10 15:35 Update for images check-in: 56558fd966 user: jim tags: NEWNET
Changes

Changes to Arduino/diag/fireDiag/Firediag.pde.

 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 ... 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 ... 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 ... 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 .... 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 .... 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 .... 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 .... 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 .... 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 .... 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298  static void test_mode_action(PACKET *pkt ); static void backoff_time_action( PACKET *pkt ); static void getdata_action( PACKET *pkt ); // EEPROM functions static void check_eerom(); static int get_address(); static int set_address( int addr ); static int get_fire_time(); static int set_fire_time( int addr ); static bool get_test_mode(); static void set_test_mode( bool addr ); static int get_backoff_time(); ................................................................................ * 16-May-2010 Add in ADDRESS setup * **********************************************************************/ void setup() { int i; unsigned char addr,caddr; // Open the serial port at 38400 bps: Serial.begin(38400); DEBUG_PRINT("\r\nFiring Test PGM V[ "); DEBUG_PRINT(__DATE__); DEBUG_PRINT(" "); DEBUG_PRINT(__TIME__); DEBUG_PRINTLN("]"); // Check EEPROM check_eeprom(); // Build the channel list ................................................................................ * * OUTPUT: NONE * **********************************************************************/ void loop() { int i,n; int buf_psn = 0; long now; char val; int len; char ch; int fired = 0; bool fire_check = false; // [83c43c7cd5] #if 0 #pragma mark - #pragma mark LOOP PKT PROCESS #endif ................................................................................ static void channel_action( PACKET *pkt ) { int ch; int ad; char *buffer; int psn; int val; char *bufp; // Build response buffer = (char *)&buf[0]; buffer[0] = 'R'; ................................................................................ * == 1 => test mode on * **********************************************************************/ static void test_mode_action( PACKET *pkt ) { bool tmode = false; bool tmode_value; char *buffer; int psn; char *bufp; DEBUG_PRINT("Test Mode Action "); DEBUG_PRINTLN(pkt->data); ................................................................................ * OUTPUT: Change board return backoff time * **********************************************************************/ static void backoff_time_action( PACKET *pkt ) { int bt = 0; int i; char *buffer; int psn; char *bufp; DEBUG_PRINT("Backoff Time Action "); DEBUG_PRINTLN(pkt->data); ................................................................................ * * OUTPUT: Returns response with data * **********************************************************************/ static void getdata_action( PACKET *pkt ) { int bt = 0; int i,n; char *buffer; int psn; char *buft; DEBUG_PRINT("Get Data Action "); DEBUG_PRINTLN(pkt->data); ................................................................................ * OUTPUT: Returns backoff time (if none returns default) * **********************************************************************/ static int get_backoff_time() { unsigned int bt,cbt; unsigned val; // (1) Read the address and the compliment value // from EERPROM bt = EEPROM.read( BACKOFF_TIME_LCN ); cbt = EEPROM.read( BACKOFF_TIME_LCNC ); cbt = 0xff & ~cbt; ................................................................................ * **********************************************************************/ static int set_backoff_time( int backt ) { unsigned int bt,cbt; unsigned char part; // (1) Build the address and compliment bt = backt; cbt = 0xff & ~backt; // (2) Now write them to eerom ................................................................................ return( rtn ); } #define CR 0x0D #define LF 0x0A #define BS 0x08 #define DEL 0x7f #define SP 0x20 #define BEL 0x07 /*********************************************************************** * * int get_input( int len,char *buffer ) * * INPUT: len - # Characters in buffer   | | > | | | | | | | | | |  90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 ... 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 ... 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 ... 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 .... 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 .... 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 .... 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 .... 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 .... 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 .... 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299  static void test_mode_action(PACKET *pkt ); static void backoff_time_action( PACKET *pkt ); static void getdata_action( PACKET *pkt ); // EEPROM functions //static void check_eerom(); static int get_address(); static int set_address( int addr ); static int get_fire_time(); static int set_fire_time( int addr ); static bool get_test_mode(); static void set_test_mode( bool addr ); static int get_backoff_time(); ................................................................................ * 16-May-2010 Add in ADDRESS setup * **********************************************************************/ void setup() { int i; //unsigned char addr,caddr; // Open the serial port at 38400 bps: Serial.begin(38400); DEBUG_PRINT("\r\nFiring Test PGM V[ "); DEBUG_PRINT(__DATE__); DEBUG_PRINT(" "); DEBUG_PRINT(__TIME__); DEBUG_PRINTLN("]"); //DEBUG_PRINTLN("-- USE FIRNET PACKET --"); // Check EEPROM check_eeprom(); // Build the channel list ................................................................................ * * OUTPUT: NONE * **********************************************************************/ void loop() { int n; int buf_psn = 0; long now; char val; int len; //char ch; int fired = 0; bool fire_check = false; // [83c43c7cd5] #if 0 #pragma mark - #pragma mark LOOP PKT PROCESS #endif ................................................................................ static void channel_action( PACKET *pkt ) { int ch; int ad; char *buffer; int psn; //int val; char *bufp; // Build response buffer = (char *)&buf[0]; buffer[0] = 'R'; ................................................................................ * == 1 => test mode on * **********************************************************************/ static void test_mode_action( PACKET *pkt ) { bool tmode = false; bool tmode_value = 0; char *buffer; int psn; char *bufp; DEBUG_PRINT("Test Mode Action "); DEBUG_PRINTLN(pkt->data); ................................................................................ * OUTPUT: Change board return backoff time * **********************************************************************/ static void backoff_time_action( PACKET *pkt ) { int bt = 0; int i = 0; char *buffer; int psn; char *bufp; DEBUG_PRINT("Backoff Time Action "); DEBUG_PRINTLN(pkt->data); ................................................................................ * * OUTPUT: Returns response with data * **********************************************************************/ static void getdata_action( PACKET *pkt ) { //int bt = 0; int i; char *buffer; int psn; char *buft; DEBUG_PRINT("Get Data Action "); DEBUG_PRINTLN(pkt->data); ................................................................................ * OUTPUT: Returns backoff time (if none returns default) * **********************************************************************/ static int get_backoff_time() { unsigned int bt,cbt; //unsigned val; // (1) Read the address and the compliment value // from EERPROM bt = EEPROM.read( BACKOFF_TIME_LCN ); cbt = EEPROM.read( BACKOFF_TIME_LCNC ); cbt = 0xff & ~cbt; ................................................................................ * **********************************************************************/ static int set_backoff_time( int backt ) { unsigned int bt,cbt; //unsigned char part; // (1) Build the address and compliment bt = backt; cbt = 0xff & ~backt; // (2) Now write them to eerom ................................................................................ return( rtn ); } #define CR 0x0D #define LF 0x0A #define BS 0x08 #define DEL 0x7f //#define SP 0x20 #define BEL 0x07 /*********************************************************************** * * int get_input( int len,char *buffer ) * * INPUT: len - # Characters in buffer 

Changes to Arduino/diag/fireDiag/eerom.h.

 44 45 46 47 48 49 50 51  #define TEST_MODE_LCN 8 #define CTEST_MODE_LCN 9 // Backoff time data #define BACKOFF_TIME_LCN 10 #define BACKOFF_TIME_LCNC 11 #endif EERPOM_H   |  44 45 46 47 48 49 50 51  #define TEST_MODE_LCN 8 #define CTEST_MODE_LCN 9 // Backoff time data #define BACKOFF_TIME_LCN 10 #define BACKOFF_TIME_LCNC 11 #endif 

Changes to Arduino/diag/fireDiag/newnet.h.

 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82  #define LED 9 #define TX_CNTL 13 #define DEVICE_PRESENT 0x80 // Above this device connected #define FIRE_CHANNELS 6 #define DEF_FIRE_TIME 3000 // # ms to fire channel #define FIRE_CHECK_TIME 100 // Check fired every 100 ms #define FIRE_CHECK_WAIT 1 // Wait 1 ms for before pres measure #define MSG_HDR ':' #define MSG_TRLR ';' #define DATA_SEP ',' #define PHY_DATA_SIZE 32 // Max size of data xfered #define CKSUM_MODULO 100 // For address calc   |  68 69 70 71 72 73 74 75 76 77 78 79 80 81 82  #define LED 9 #define TX_CNTL 13 #define DEVICE_PRESENT 0x80 // Above this device connected #define FIRE_CHANNELS 6 #define DEF_FIRE_TIME 3000 // # ms to fire channel #define FIRE_CHECK_TIME 300 // Check fired every 100 ms #define FIRE_CHECK_WAIT 1 // Wait 1 ms for before pres measure #define MSG_HDR ':' #define MSG_TRLR ';' #define DATA_SEP ',' #define PHY_DATA_SIZE 32 // Max size of data xfered #define CKSUM_MODULO 100 // For address calc 

Changes to Docs/firenet.lyx.


Changes to Docs/firenet.pdf.

cannot compute difference between binary files