misc changes
This commit is contained in:
parent
379bb0f76f
commit
4cd00678b7
35
.gitignore
vendored
35
.gitignore
vendored
|
@ -1,32 +1,3 @@
|
|||
# Object files
|
||||
*.o
|
||||
*.ko
|
||||
*.obj
|
||||
*.elf
|
||||
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
*.pch
|
||||
|
||||
# Libraries
|
||||
*.lib
|
||||
*.a
|
||||
*.la
|
||||
*.lo
|
||||
|
||||
# Shared objects (inc. Windows DLLs)
|
||||
*.dll
|
||||
*.so
|
||||
*.so.*
|
||||
*.dylib
|
||||
|
||||
# Executables
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
*.i*86
|
||||
*.x86_64
|
||||
*.hex
|
||||
|
||||
# Debug files
|
||||
*.dSYM/
|
||||
.pioenvs
|
||||
.clang_complete
|
||||
.gcc-flags.json
|
||||
|
|
|
@ -53,7 +53,7 @@ void setup() {
|
|||
radio.openReadingPipe(1, addresses[0]);
|
||||
radio.startListening();
|
||||
|
||||
Serial << "im a bot!" << endl;
|
||||
if(DEBUG) Serial << "im a bot!" << endl;
|
||||
} else {
|
||||
role = role_ping_out;
|
||||
|
||||
|
@ -61,7 +61,7 @@ void setup() {
|
|||
radio.openReadingPipe(1, addresses[1]);
|
||||
radio.stopListening();
|
||||
|
||||
Serial << "im a controller!" << endl;
|
||||
if(DEBUG) Serial << "im a controller!" << endl;
|
||||
}
|
||||
|
||||
if(role==role_pong_back)
|
||||
|
@ -90,14 +90,19 @@ void loop() {
|
|||
/****************** Ping Out Role ***************************/
|
||||
|
||||
if (role == role_ping_out) {
|
||||
|
||||
myData.xin = analogRead(AX_pin);
|
||||
if(myData.xin == 517){ myData.xin = 518;} //terrible hack.
|
||||
myData.yin = analogRead(AY_pin);
|
||||
|
||||
bool ok = radio.write( &myData, sizeof(myData) );
|
||||
if(DEBUG) Serial<<"xin:"<<myData.xin<<" yin:"<<myData.yin<<endl;
|
||||
/*
|
||||
if (ok)
|
||||
Serial << "transfer OK \n\r";
|
||||
else
|
||||
Serial << "transfer failed \n\r";
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user