These are chat archives for SmingHub/Sming

12th
Jan 2016
laurentppol
@laurentppol
Jan 12 2016 08:35
@zhivko 1-2 Pt1000 on 24bit ADC (for 0.01 resolution), 3-4 DS18B20 (1/16 deg resolution).
laurentppol
@laurentppol
Jan 12 2016 15:53
@alonewolfx2 is You that ported "Adafruit_ILI9341" library? How "original" (Arduino) is written? Is in C or C++?
alonewolfx2
@alonewolfx2
Jan 12 2016 16:13
c++
with external hspi.c
Richard Antony Burton
@raburton
Jan 12 2016 17:57
@hreintke you around?
riban-bw
@riban-bw
Jan 12 2016 18:06
@raburton can a PR be squashed when it is accepted in to the original repo? I don't know what process is used. A rebase or merge would allow that wouldn't it? I may get time tonight to squash #542 but can't be sure. (Too many late nights and neglecting family are proving to be bad life choice!)
Richard Antony Burton
@raburton
Jan 12 2016 18:10
it hasn't been merged yet, so it's only in your own repo
you can still squash them locally, then git push -f to update your github repo
that will update the pr
riban-bw
@riban-bw
Jan 12 2016 18:17
Okay, I'll do it later, hopefully.
Richard Antony Burton
@raburton
Jan 12 2016 18:23
i can do for you now if you like (it will be against a new pr as i don't have access to your repo of course)
but it will still have your name on it ;-)
@riban-bw i notice you removed IRAM_ATTR from Digital.h, was that deliberate?
riban-bw
@riban-bw
Jan 12 2016 18:29
@raburton Leave it to me. I don't know how the IRAM_ATTR removal happened. I thought I had fixed that in my last commit.
Richard Antony Burton
@raburton
Jan 12 2016 18:32
no problem
riban-bw
@riban-bw
Jan 12 2016 18:35
Yep, just checked. Last commit added IRAM_ATTR back. Don't know where it dropped out. Anyway, will try to get it ready for you to merge by end of day. Travelling now and about to lose connectivity.
Richard Antony Burton
@raburton
Jan 12 2016 18:37
cool, i must be looking at an old commit
no hurry really, just be nice to get it in
whenever you get chance
alonewolfx2
@alonewolfx2
Jan 12 2016 18:54
8b2a7fa0-6ae4-411c-9c44-f3fe454aade5.jpg
now we have mfrc522 rfid example on sming_rtos :)
riban-bw
@riban-bw
Jan 12 2016 18:57
@alonewolfx2 cool. I'll be glad when I stop documenting and get back to making. I have RFID I haven't played with yet.
hreintke
@hreintke
Jan 12 2016 18:59
@raburton : I am in now
Richard Antony Burton
@raburton
Jan 12 2016 18:59
reminds me i have a proper hw pwm device here i've been meaning to write a driver for
@hreintke wondered if you'd tried writing the spiffs to the address i suggested, instead of the one the makefile was telling you to
and if that worked
hreintke
@hreintke
Jan 12 2016 19:03
no, not yet. I have not been working on/with rtos since our last contact.
I think I can see where it will be flashed without actual flashing. will try now
current makefile flashes to 54000, your suggestion flashes to 55000.
Presume it will be OK. actual testing on device will be tomorrow morning
Richard Antony Burton
@raburton
Jan 12 2016 19:07
i've looked at the sming code that works out where to load the fs from, and my suggested calculation method is supposed to replicate that
so hopefully it'll work
i don't understand the logic of the older code in the makefile
hreintke
@hreintke
Jan 12 2016 19:10
Are the 0x0a000 + 0x01000 dependent on settings in LD file ?
Richard Antony Burton
@raburton
Jan 12 2016 19:11
0x0a000 is the position of the irom segment origin from the ld file
the 0x01000 is just the size of one sector, so we move to the next free one
i could have combined the two of course, but then the origins of the number would be less obvious
hreintke
@hreintke
Jan 12 2016 19:14
sure, better so.
The LD file now is : irom0_0_seg : org = 0x4020A000, len = 0x52000
But I updated it from 0x40209000 0x4020A000 for the csum error
Richard Antony Burton
@raburton
Jan 12 2016 19:15
yeah, that's another thing i still don't entirely understand, but i didn't look into it much because it doesn't apply when using rBoot, which I always do
hreintke
@hreintke
Jan 12 2016 19:27

My idea is that the csum error is also because of overwriting

  iram1_0_seg :                           org = 0x40100000, len = 0x9000
  irom0_0_seg :                           org = 0x4020A000, len = 0x52000

If the iram1_seg exceeds the len, the irom_0 overwrites the end.
I only would expect that the linker would trigger that issue

Richard Antony Burton
@raburton
Jan 12 2016 19:39
linker won't complain because they don't overlap there, they are in separate megabytes
but when they end up on the flash then can physically overlap, but the checksums matched despite the error
unless that's a display bug in the rom
either way, your fix works
riban-bw
@riban-bw
Jan 12 2016 21:07
@raburton I am pulling my hair out trying to rebase my branch to squash the commits. I think I give up. Shall we just commit what is there?
Richard Antony Burton
@raburton
Jan 12 2016 21:10
do you want me to do it?
or talk you through it?
riban-bw
@riban-bw
Jan 12 2016 21:10
Please
You can talk me through it.
Richard Antony Burton
@raburton
Jan 12 2016 21:11
let me just grab your branch so i can do it here to explain the steps...
ok, so i have your branch checked out
on your doxygen branch do this: git pull --rebase upstream develop
riban-bw
@riban-bw
Jan 12 2016 21:16
fatal: 'upstream' does not appear to be a git repository
Richard Antony Burton
@raburton
Jan 12 2016 21:16
ok, do you have a link in your local repo to the upstream sming repo? or do you usually just do prs in the github site?
to update your own repo?
git remote add upstream https://github.com/SmingHub/Sming.git
riban-bw
@riban-bw
Jan 12 2016 21:17
I have added upstream
Richard Antony Burton
@raburton
Jan 12 2016 21:17
that will add the upstream for you
cool
riban-bw
@riban-bw
Jan 12 2016 21:18
now run rebase: From github.com:SmingHub/Sming
  • branch develop -> FETCH_HEAD
  • [new branch] develop -> upstream/develop
    Current branch develop is up to date.
Richard Antony Burton
@raburton
Jan 12 2016 21:18
ok switch to your doxygen branch git checkout doxygen
riban-bw
@riban-bw
Jan 12 2016 21:19
done
Richard Antony Burton
@raburton
Jan 12 2016 21:19
then git pull --rebase upstream develop
i get a merge error, funnily enough about those iram_attrs!
do a git status and you'll see this:
raburton@debian:~/dev/Sming/Sming$ git status
rebase in progress; onto 195eb17
You are currently rebasing branch 'doxygen' on '195eb17'.
  (fix conflicts and then run "git rebase --continue")
  (use "git rebase --skip" to skip this patch)
  (use "git rebase --abort" to check out the original branch)

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

    modified:   SmingCore/Clock.h
    modified:   SmingCore/Debug.h
    modified:   SmingCore/DriverPWM.h
    modified:   SmingCore/ESP8266EX.h
    modified:   SmingCore/FileSystem.h
    modified:   SmingCore/HardwarePWM.h
    modified:   SmingCore/HardwareSerial.h
    modified:   SmingCore/Interrupts.h
    modified:   SmingCore/Platform/AccessPoint.h
    modified:   SmingCore/Platform/RTC.h
    modified:   SmingCore/Platform/Station.h
    modified:   SmingCore/Platform/System.h
    modified:   SmingCore/Platform/WDT.h
    modified:   SmingCore/SystemClock.h
    modified:   SmingCore/Timer.h
    modified:   rboot/appcode/rboot-api.h
    modified:   rboot/rboot.h
    new file:   ../docs/Doxyfile
    new file:   ../docs/api.dox
    new file:   ../docs/api.md
    new file:   ../docs/publish_api.sh
Unmerged paths:
  (use "git reset HEAD <file>..." to unstage)
  (use "git add <file>..." to mark resolution)

    both modified:   SmingCore/Digital.h
riban-bw
@riban-bw
Jan 12 2016 21:20
yep
I was at this stage a few times tonight!
Richard Antony Burton
@raburton
Jan 12 2016 21:21
ok, open the offending SmingCore/Digital.h in your editor and manually merge
riban-bw
@riban-bw
Jan 12 2016 21:21
So has this squashed everything but I need to redo my fixing of Digital.h (which I did in a previous commit)
?
Richard Antony Burton
@raburton
Jan 12 2016 21:22
you'll see a 'head' section with the old lines in it, remove this, icluding the >> and === line
yes, i don;t know why this merge issue has come up, something funny about that commit!
but easily fixed
riban-bw
@riban-bw
Jan 12 2016 21:22
I'll use meld to merge
Richard Antony Burton
@raburton
Jan 12 2016 21:22
now just add the iram_attrs to the functions in the branch copy of the code
and remember to removbe the <<<< line at the bottom of the merge conflic section
that's your merge conflict sorted, luckily wasn't a complicated one
once you are happy with the file do git add SmingCore/Digital.h
check git status they should all be green
then do git rebase --continue
it will reapply your 7 commits on top of the updated develop base
now to squash, check git log
just to confirm all your 7 commits are at the top of the list, they are - good!
now to squash
Richard Antony Burton
@raburton
Jan 12 2016 21:27
git rebase -i HEAD~7
you'll see this:
pick 972415b Adds (partial) API documentation. Adds scripts for automated documentation build and publishing via Travis-CI. This is not yet enabled.
pick fe8ae82 Adds Travis-ci automation to create and publish API documentation. Requires docs/travisci_rsa.enc file to be replaced by Travis user. Requires .travis.yml to be updated with correct Travis-CI user encryption environmental variables. Note: travis encrypt-file will add lines to .travis.yml which then need to be modifed to be similar to the ones already there. Existing lines then deleted.
pick d3059a3 Publish API documentation logs to aid dcoumentation effort
pick ad22315 Revert "Adds Travis-ci automation to create and publish API documentation."
pick 5d1e7b9 Removes individual author, license, copyright notices from doxygen. Adds main page in doxygen format (not markup).
pick 2758b5a Fixes some typos
pick eae2534 API documentation add (some) SDK elements, e.g. constants. API documentation modules now alphabetical. API documentation hide files. API documentation create error.log by default to avoid need to redirect error output. API documentation show timestamp of creation in html. API documentation only run automation for SmingHub repository. (Automation not yet enabled.)

# Rebase 195eb17..eae2534 onto 195eb17
...
change all but the top 'pick' to 's'
pick 972415b Adds (partial) API documentation. Adds scripts for automated documentation build and publishing via Travis-CI. This is not yet enabled.
s fe8ae82 Adds Travis-ci automation to create and publish API documentation. Requires docs/travisci_rsa.enc file to be replaced by Travis user. Requires .travis.yml to be updated with correct Travis-CI user encryption environmental variables. Note: travis encrypt-file will add lines to .travis.yml which then need to be modifed to be similar to the ones already there. Existing lines then deleted.
s d3059a3 Publish API documentation logs to aid dcoumentation effort
s ad22315 Revert "Adds Travis-ci automation to create and publish API documentation."
s 5d1e7b9 Removes individual author, license, copyright notices from doxygen. Adds main page in doxygen format (not markup).
s 2758b5a Fixes some typos
s eae2534 API documentation add (some) SDK elements, e.g. constants. API documentation modules now alphabetical. API documentation hide files. API documentation create error.log by default to avoid need to redirect error output. API documentation show timestamp of creation in html. API documentation only run automation for SmingHub repository. (Automation not yet enabled.)

# Rebase 195eb17..eae2534 onto 195eb17
...
save and exit
next you'll be shown all the commit messages from the 7 commits in your editor
riban-bw
@riban-bw
Jan 12 2016 21:30
yep
Richard Antony Burton
@raburton
Jan 12 2016 21:30
combine/edit/replace this as required
save and exit
and now you have a single commit with all your changes in, on top of the latest version of develop git log to see confirmation
now git push -f origin doxygen(adjust your repo remote name and branch as required)
riban-bw
@riban-bw
Jan 12 2016 21:38
Okay - that was easy....
PR updated to single commit. Running tests.
Richard Antony Burton
@raburton
Jan 12 2016 21:38
i see it, looking good
so general git tips...
so unless there are conflicts you don't need to rebase/merge, you can happily work on an older version of the branch
from a merge point, functionally there could be changes that don;t conflict but still cause an issue
and if you do ever need to update your branch in the middle of working on it don't do a git pull upstream develop do a git pull --rebase upstream develop
which will remove your commits, update the branch, then reapply them on top
this way you can fix any merge issues at the time and your commits always remain at the top of the change list, not mixed in
it also avoids adding merge commits to your local repo that then end up in your pr
riban-bw
@riban-bw
Jan 12 2016 21:43
It was that last point that threw me
Richard Antony Burton
@raburton
Jan 12 2016 21:43
then last step once everything in the pr is looking good and approved, etc. ready to merge, you can just do the git rebase -i HEAD~<number_of_commits>
force push and everything is dandy
riban-bw
@riban-bw
Jan 12 2016 21:44
I read a good tutorial on merging and rebasing but I think I had got myself a bit tied up with overlapping pulls
Richard Antony Burton
@raburton
Jan 12 2016 21:44
git can be messy, i'm getting fairly proficient at certain tasks, but i can still get in a mess at times
riban-bw
@riban-bw
Jan 12 2016 21:45
I am just reviewing the PR now to ensure I haven't done anything bad.
Richard Antony Burton
@raburton
Jan 12 2016 21:45
cool tell me when you're happy and i'll merge it
i checked digital.h and that looked ok
riban-bw
@riban-bw
Jan 12 2016 21:47
I did move the "#endif / SMING_CORE_PWM_H /" to the end of Sming/SmingCore/DriverPWM.h. That is where I think it should be.
Richard Antony Burton
@raburton
Jan 12 2016 21:49
i should have thought so
riban-bw
@riban-bw
Jan 12 2016 21:52
looks okay. I left the rboot stuff in there. You said you would splat over the top of it.
Richard Antony Burton
@raburton
Jan 12 2016 21:53
yeah, i'll do that next time i update it, there is nothing in there that's a problem
i'll merge for you then
riban-bw
@riban-bw
Jan 12 2016 21:53
Cheers!
Richard Antony Burton
@raburton
Jan 12 2016 21:53
done
thanks for that, it was really needed!
riban-bw
@riban-bw
Jan 12 2016 21:54
Quite! I might have a clue how to use the framework now.
Richard Antony Burton
@raburton
Jan 12 2016 21:55
you must have learnt it pretty well from writing the docs
riban-bw
@riban-bw
Jan 12 2016 21:55
i will write up a style guide to documenting and add it to the wiki
Richard Antony Burton
@raburton
Jan 12 2016 21:55
thanks
riban-bw
@riban-bw
Jan 12 2016 21:55
I wanted to just use it, not have to read the source code to figure it out. That is what the API docs is for.
There is still much to document. I think I need a short break from it. I will do some more but it would be nice if others also had a go. We need to avoid duplicate effort though.
riban-bw
@riban-bw
Jan 12 2016 22:01
It is not clear from github or here who has write access to the github repo. It would be useful to add to CONTRIBUTING.md something about the final stages of committing changes, including who can apply them back to the repo
Richard Antony Burton
@raburton
Jan 12 2016 22:12
people with permission to merge get notified of PRs and in theory will look at them and merge when appropriate
hreintke
@hreintke
Jan 12 2016 23:10
@raburton : are you still in ?