diff --git a/source/Transceiver.hpp b/source/Transceiver.hpp index 3707b6e96a62687524398943be5d4d4c867c0c87..b71da6d57384e2a08d7b465abdfaf751cfc91bc8 100644 --- a/source/Transceiver.hpp +++ b/source/Transceiver.hpp @@ -30,25 +30,10 @@ // SAXBOPHONE.COM is my domain, so I'm using the reverse form as my namespace namespace com_saxbophone { /** - * @brief A basic class responsible only for pairing and low-level comms + * @brief A basic class responsible only for low-level comms */ class Transceiver { public: - /** - * @brief Attempt to pair with another connected micro:bit - * @param my_role Whether we wish to be the Master or Slave for comms - * purposes - * @returns true if paired successfully - * @returns false if unable to pair successfully - * @note This is a blocking call! - */ - bool pair(Role my_role); - - /** - * @returns Whether or not this Transceiver is currently paired - */ - bool is_paired() const; - /** * @brief Used to allow synchronising both of a paired Master and Slave * @details Blocks the caller until a point in time a fixed duration diff --git a/source/main.cpp b/source/main.cpp index 047622c6a88b74f6f098b419d4ae71def84ed407..0547b9d2b7893ba95f66ef8407619dfeac340d68 100755 --- a/source/main.cpp +++ b/source/main.cpp @@ -375,7 +375,7 @@ void morse_checker() { * NOTE: for now, just sending characters as-is but in the future * they will be encoded rather than sent raw */ - transceiver.send(current); // NOTE: Might need cast + // transceiver.send(current); // NOTE: Might need cast } else { // otherwise, peek into what the code appears to be thus far char peek = decoder.peek(); @@ -414,10 +414,15 @@ int main() { button_tracker.init(); // enable the morse checker! morse_checker_enabled = true; + // scroll "PM" to mean "PAIRED MASTER" + ubit.display.scroll("PM"); + } else if (my_role == Role::SLAVE) { + // scroll "PS" to mean "PAIRED SLAVE" + ubit.display.scroll("PS"); } // call barrier to synchronise both master and slave - transceiver.barrier(); + // transceiver.barrier(); /* BEGIN COMMS */ @@ -434,7 +439,7 @@ int main() { * in the future */ - transceiver.close(); + // transceiver.close(); // if we're the Master, we need to stop the button tracker if (my_role == Role::MASTER) {