Skip to content
Browse files

C++ is not a language for the faint of heart.

  • Loading branch information...
1 parent 156cdf3 commit 6e99cff0a7decfdb314f84f6a198754eb6b8adc7 @phooky phooky committed Aug 26, 2011
View
6 v2/src/Motherboard/Main.cc
@@ -54,12 +54,6 @@ void reset(bool hard_reset) {
}
int main() {
- // For debugging: If there is a problem with the object constructors,
- // then this won't result in the debug LED sticking on.
-// cli();
-// Pin(PortB,7).setDirection(true);
-// Pin(PortB,7).setValue(true);
-// while(true) {}
Motherboard& board = Motherboard::getBoard();
steppers::init(Motherboard::getBoard());
View
2 v2/src/Motherboard/boards/mb24/Motherboard.hh
@@ -60,8 +60,8 @@ private:
bool hasInterfaceBoard;
ButtonArray buttonArray;
- InterfaceBoard interfaceBoard;
LiquidCrystal lcd;
+ InterfaceBoard interfaceBoard;
MainMenu mainMenu; ///< Main system menu
SplashScreen splashScreen; ///< Displayed at startup
View
4 v2/src/shared/InterfaceBoard.cc
@@ -5,8 +5,8 @@
#if defined HAS_INTERFACE_BOARD
-InterfaceBoard::InterfaceBoard(const ButtonArray& buttons_in,
- const LiquidCrystal& lcd_in,
+InterfaceBoard::InterfaceBoard(ButtonArray& buttons_in,
+ LiquidCrystal& lcd_in,
const Pin& foo_pin_in,
const Pin& bar_pin_in,
Screen* mainScreen_in,
View
8 v2/src/shared/InterfaceBoard.hh
@@ -40,9 +40,9 @@
/// \ingroup HardwareLibraries
class InterfaceBoard {
public:
- LiquidCrystal lcd; ///< LCD to write to
+ LiquidCrystal& lcd; ///< LCD to write to
private:
- ButtonArray buttons; ///< Button array to read from
+ ButtonArray& buttons; ///< Button array to read from
// TODO: Drop this?
Screen* buildScreen; ///< Screen to display while building
@@ -70,8 +70,8 @@ public:
/// \param[in] Pin connected to the bar LED
/// \param[in] Main screen, shown as root display
/// \param[in] Screen to display while building
- InterfaceBoard(const ButtonArray& buttons_in,
- const LiquidCrystal& lcd_in,
+ InterfaceBoard(ButtonArray& buttons_in,
+ LiquidCrystal& lcd_in,
const Pin& foo_pin_in,
const Pin& bar_pin_in,
Screen* mainScreen_in,

0 comments on commit 6e99cff

Please sign in to comment.
Something went wrong with that request. Please try again.