Skip to content

Commit

Permalink
moved python generator headers to separate python file
Browse files Browse the repository at this point in the history
  • Loading branch information
l4m4re committed May 5, 2018
1 parent c7df051 commit 2c5bfa6
Show file tree
Hide file tree
Showing 6 changed files with 605 additions and 267 deletions.
5 changes: 4 additions & 1 deletion src/examples/test2d/test2d.ino
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

using namespace std;

#define BAUDRATE 9600
#define BAUDRATE 115200

// Stuff needed for printing
FILE serial_stdout;
Expand Down Expand Up @@ -103,8 +103,11 @@ void setup()
Map2D<8, int16_t, int8_t> testInt8;
testInt8.setXs_P(xs);
testInt8.setYs_P(ys8);
testInt8.printTo( Serial );
testInt8.updateEeprom(0);
testInt8.printTo( Serial );
testInt8.readEeprom(0);
testInt8.printTo( Serial );

Map2D<8, int16_t, Fix16> testFix16;
testFix16.setXs_P(xs);
Expand Down
25 changes: 6 additions & 19 deletions src/gen_spec1D.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
#!/usr/bin/python

print "//-----------------------------------------------------------------------------"
print "//"
print "// Copyright (C) 2018 Arend Lammertink"
print "//"
print "// This program is free software; you can redistribute it and/or modify it"
print "// under the terms of the GNU General Public License as published by the Free"
print "// Software Foundation, version 3."
print "//"
print "// This program is distributed in the hope that it will be useful, but WITHOUT"
print "// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or"
print "// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for"
print "// more details."
print "//"
print "// You should have received a copy of the GNU Lesser General Public License"
print "// along with this program. If not, see <http://www.gnu.org/licenses/>."
print "//-----------------------------------------------------------------------------"
print
print"//-----------------------------------------------------------------------------"
from utils import *

print inc_header

print sep
print"// 1D specialization for integers by casting to Fix16, generated by script "
print"//-----------------------------------------------------------------------------"
print sep
print

print
Expand Down
25 changes: 6 additions & 19 deletions src/gen_spec2D.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
#!/usr/bin/python

print "//-----------------------------------------------------------------------------"
print "//"
print "// Copyright (C) 2018 Arend Lammertink"
print "//"
print "// This program is free software; you can redistribute it and/or modify it"
print "// under the terms of the GNU General Public License as published by the Free"
print "// Software Foundation, version 3."
print "//"
print "// This program is distributed in the hope that it will be useful, but WITHOUT"
print "// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or"
print "// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for"
print "// more details."
print "//"
print "// You should have received a copy of the GNU Lesser General Public License"
print "// along with this program. If not, see <http://www.gnu.org/licenses/>."
print "//-----------------------------------------------------------------------------"
print
print"//-----------------------------------------------------------------------------"
from utils import *

print inc_header

print sep
print"// 2D specialization for integers by casting to Fix16, generated by script."
print"//-----------------------------------------------------------------------------"
print sep
print

print
Expand Down
15 changes: 8 additions & 7 deletions src/interpol1d_spec.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
//
// Copyright (C) 2018 Arend Lammertink
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation, version 3.
// This library is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, version 3.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// This library is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
// more details.
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
// for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// along with this library. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------

//-----------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 2c5bfa6

Please sign in to comment.