These are chat archives for SmingHub/Sming

13th
Feb 2016
alon24
@alon24
Feb 13 2016 06:13
@ivmi u saw the issue too? And that fixed it? Cool
Ivan Miskovic
@ivmi
Feb 13 2016 06:15
Yes
alon24
@alon24
Feb 13 2016 06:18
So can u pr it?
alon24
@alon24
Feb 13 2016 08:52
@ivmi I saw u'r fix, but I do not use servo, just hw pwm, maybe it's related, I am not by my computer
Ivan Miskovic
@ivmi
Feb 13 2016 09:52
@alon24 Sorry, I misread your problem. It seems that's a different issue.
hreintke
@hreintke
Feb 13 2016 10:57

@alon24 :
Probably we hit a sdk issue.
In application you use analogWrite, in hardwarePWM that is setDuty(..);pwm_start;
This works to set a duty to a pin.
But when you do fast analogWrite();analogWrite(); the duties are not set correctly.
To temporary overcome I made the following additions to hardwarePWM.

  • In setDuty and analogWrite : additional parameter, default true.
    When false it the pwm_start() is not executed -> no direct effect on the duty.
  • I added a HardwarePWM.restart() -> execute only pwm_start();

So, in your drive(....) you can use either
analogWrite(pin1,duty,false)
analogWrite(pin2,duty,true)
or
analogWrite(pin1,duty,false)
analogWrite(pin2,duty,false)
restart()

The updates to HardwarePWM are available in the HardwarePWM_Setduty branch of SmingRTOS.
Can you use this in your application and feedback the results ?

alon24
@alon24
Feb 13 2016 11:10
i will try later for this
question now if u can, how can I get my project in eclipse to refrence the rtos eclipse project, and not show reds all over
i tried index rebuild and it does not work
(I had both the rtos project and the regular one), but now i removed the regular one from eclipse, and all is red in my porject
hreintke
@hreintke
Feb 13 2016 11:35
@alon24 :
There is a file in the sming directory : Eclipse_Project_Setting.xml
In your project properties/paths and symbols-> includes tab.
First restore defaults - apply
The import settings -> above file.
red lines should be gone
alon24
@alon24
Feb 13 2016 12:06
do i do #include "SmingCore.h" or #include <SmingCore.h>
also red lines still there\
hreintke
@hreintke
Feb 13 2016 12:36
did you rebuild the index ?
alon24
@alon24
Feb 13 2016 12:58
Yes, will try again a bit later
alon24
@alon24
Feb 13 2016 14:28
tried again, they do not go away
alon24
@alon24
Feb 13 2016 14:40
so clean, refresh index rebuild.... some more voodoo, 3 hail mary ... and now its not showing red lines
hreintke
@hreintke
Feb 13 2016 15:03
Quick, make a picture It might never happen again :smile:
zhivko
@zhivko
Feb 13 2016 20:15
@alon24: I know that feeling ;)
alon24
@alon24
Feb 13 2016 21:48
@zhivko :)