Skip to content

Commit

Permalink
Merge pull request #180 from stuartpittaway/onboard-current-monitor
Browse files Browse the repository at this point in the history
Onboard current monitor INA229
  • Loading branch information
stuartpittaway authored Mar 1, 2023
2 parents 7780f30 + 7544257 commit a21d13e
Show file tree
Hide file tree
Showing 17 changed files with 1,529 additions and 65 deletions.
15 changes: 13 additions & 2 deletions ESPController/buildscript_versioning.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
""" Script for DIYBMS """
import datetime
import time
import subprocess
import os
from os import path
Expand All @@ -26,8 +27,7 @@
if (path.exists('..'+os.path.sep+'.git')):
# Get the latest GIT version header/name
try:
git_sha = subprocess.check_output(
['git', 'log', '-1', '--pretty=format:%H']).decode('utf-8')
git_sha = subprocess.check_output(['git', 'log', '-1', '--pretty=format:%H']).decode('utf-8')
except:
# Ignore any error, user may not have GIT installed
git_sha = None
Expand Down Expand Up @@ -91,4 +91,15 @@
f.write(str(int(datetime.datetime.utcnow().strftime("%W"))))
f.write(";\n\n")

# dt=datetime.datetime.utcnow()
dt=datetime.datetime.utcnow()

f.write("const char COMPILE_DATE_TIME_UTC[] = \"")
f.write(dt.isoformat()[:-3]+'Z')
f.write("\";\n\n")

f.write("const uint32_t COMPILE_DATE_TIME_UTC_EPOCH = ")
f.write(int(time.mktime(dt.timetuple())).__str__())
f.write("UL;\n\n")

f.write("#endif")
Loading

0 comments on commit a21d13e

Please sign in to comment.