Skip to content
Snippets Groups Projects
Commit c1124c8a authored by Jake Read's avatar Jake Read
Browse files

back together

parent a591263a
Branches
No related tags found
No related merge requests found
......@@ -205,7 +205,6 @@ void setup() {
// l i g h t s
ERRLIGHT_ON;
CLKLIGHT_ON;
/*
// osap
osapSetup();
// ports
......@@ -230,16 +229,18 @@ void setup() {
// smoothie (and frequency of loop below)
#warning pls reconsider maximal rates / etc given new loop freq... and how / where to parameterize
smoothieRoll->init(20000);
*/
// bare serial
Serial.begin(9600);
//Serial.begin(9600);
// barebus
ucBusHead_setup();
//ucBusHead_setup();
// 25kHz base (40us period) or
// 20kHz base (50us period)
d51ClockBoss->start_ticker_a(100);
d51ClockBoss->start_ticker_a(50);
}
//#define TEST_TX
#ifdef TEST_TX
unsigned long lastTx = 0;
uint8_t testTx[33] = {
1, 2, 3, 4, 0, 6, 7, 8, 9, 10,
......@@ -248,20 +249,19 @@ uint8_t testTx[33] = {
31, 32, 33 };
uint8_t tstRx[256];
#define TEST_TX
#endif
void loop() {
// write ~ every second, transmit on chb to drop 1
// check indices on the way down / up ... was shifting, are not anymore
//osapLoop();
//conveyor->on_idle(nullptr);
osapLoop();
conveyor->on_idle(nullptr);
#ifdef TEST_TX
if(ucBusHead_ctr(1)){
uint16_t len = ucBusHead_read(1, tstRx);
logPacket(tstRx, len);
}
#ifdef TEST_TX
if(millis() > lastTx + 100){
lastTx = millis();
if(ucBusHead_ctsB(1)){
......
Subproject commit 7d0be7a5c309aab2a3300116c7e9fd2c425fc6cb
Subproject commit af5f9a0e004a6134b38f0f1996bebda271f9c655
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment