Skip to content

Conversation

@LinnierGames
Copy link
Member

@LinnierGames LinnierGames commented Apr 26, 2016

  • Compiles on desktop
  • Complies on Teensy
  • Complete Codes SpreadSheet

closes #83

Substitute assert(e) with assertion( condition, integer code ). Definitions of code values is saved in AssertionHandler-Dictionary.csv

Changes

( + ) AssertionHandler.h

  • using a macro to output to the console using Logger( .. )

objects = {

/* Begin PBXBuildFile section */
E1B489D01CC87D9300643A24 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1B489CF1CC87D9300643A24 /* main.cpp */; };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow xcode projects are ugly

@LinnierGames LinnierGames changed the title Erick assertion handler Erick Assertion Handler Jun 2, 2016
# Conflicts:
#	workspace.xcworkspace/contents.xcworkspacedata
Codes are located at this
[spreadsheet](https://docs.google.com/spreadsheets/d/1zIhQ-8UmOYflNnDYCz
lLkUQ36gXbFe5Jb5eG3tSFJYs/edit?usp=sharing)
…ick_assertion-handler

# Conflicts:
#	workspace.xcworkspace/contents.xcworkspacedata
Micromouse::Memory::write( Micromouse::ERROR_MEMORY, intNextIndex);

}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a function here that dumps all the errors in memory to the serial port using log()

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, you mean read all the codes and output them to the serial port?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't tell if i did it right :P

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not quite, look at logger.h for proper use

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about now???
plus i can't tell why i can't call to this inline method anywhere in the project :P

@blhough
Copy link
Member

blhough commented Jun 3, 2016

Looks good, just need a way to view the errors


}

inline static void printErrorCodes() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does it need to be inline?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm, beats the hell out of me, i thought i had to, does it need to be static? i would say no huh

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it can just be a regular global function

@LinnierGames LinnierGames self-assigned this Jun 10, 2016
@blhough
Copy link
Member

blhough commented Jul 14, 2016

Needs to be tested on the mouse

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assertion Handler

3 participants