Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: src/lut.cpp
- Revision:
- 4:db38665c3727
- Child:
- 5:09be5bbb5020
diff -r d8948c5b2951 -r db38665c3727 src/lut.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/lut.cpp Thu Nov 29 00:07:25 2018 +0000 @@ -0,0 +1,70 @@ +//------------------------------------------------------------------------------- +// +// Treehouse Designs Inc. +// Colorado Springs, Colorado +// +// Copyright (c) 2016 by Treehouse Designs Inc. +// Copyright (c) 2018 by Agility Power Systems Inc. +// +// This code is the property of Treehouse Designs, Inc. (Treehouse) and +// Agility Power Systems Inc. (Agility) and may not be redistributed +// in any form without prior written permission from +// both copyright holders, Treehouse and Agility. +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// +//------------------------------------------------------------------------------- +// +// REVISION HISTORY: +// +// $Author: $ +// $Rev: $ +// $Date: $ +// $URL: $ +// +//------------------------------------------------------------------------------- + +#include "mbed.h" +#include "lut.h" + +//unsigned int binCode[6]; + +void dec2bin(int dec){ + + int k; + int n=5; + + for (int c = 5; c >= 0; c--) + { + k = dec >> c; + + if (k & 1) + binCode[n] = 1; + else + binCode[n] = 0; + + n--; + } +} + + +void dec2therm(int dec){ + + for (int i = 0; i <= 16; i++) + { + thermCode[i] = 0; + } + + for (int i = 0; i <= dec; i++) + { + thermCode[i] = 1; + } + +} + +void getLUTcode(void){ + + +} \ No newline at end of file