Comment changes; changed delay function to use count-down instead of count-up as per TI's Ultra-Low Power Advisor, rule 13.1

It doesn't really make any difference since it's just a delay function, but will follow their best practices anyway.
This commit is contained in:
William Miceli
2021-05-14 17:00:05 -04:00
parent 6966e0bccb
commit 27bda00eda
4 changed files with 12 additions and 48 deletions

View File

@@ -1,47 +1,8 @@
//
// Telemetry
//
// Modified by Erik in 2010-2011
//
/* Modifications for 2013 by B. Bazuin
* - 2013v1
* - reworked to operate continuously with CAN at 250 kbps
* - no USB device code included
* - no ADC code
* - table values collected only the first time captured
* - 2014V2 MODIFICATIONS
* - Reordered and eliminated some messages
* - HF rate 10 sec, LF rate 30 sec, ST rate 60 sec
* - BP_PCDONE and BP_ISH added
* - Precharge Controller Removed
*/
/* Modifications for 2016 by B. Bazuin
* -New BPS and Array Controller
*
/*
* main.c
*/
#include "SunseekerTelemetry2021.h"
y2021.h"
// structures
//message_fifo decode_queue;
//char_fifo USB_FIFO, MODEM_FIFO;
//hf_packet pckHF;
//lf_packet pckLF;
//status_packet pckST;
unsigned volatile char forceread;
unsigned int can_mask0, can_mask1;
enum MODE {INIT, CANREAD, DECODE, MODEMTX, USBTX, LOWP, LOOP} ucMODE;
unsigned volatile char can_status_test, can_rcv_status_test;
unsigned long can_msg_count = 0, can_stall_cnt = 0;
unsigned long can_err_count = 0, can_read_cnt = 0;
int thrs, tmin, tsec;
char ucFLAG,usbENABLE;
char CAN1_INT_FLAG = FALSE;