
PRO
dbeard
USA
Asked
— Edited
Can anyone point me in the direction to find a way to tell how much time there is between two dates.
For example Date1 = 10/29/2016 10:30:54 PM and Date2 = 10/28/2016 7:00:01 AM
How many days, hours, minutes, and seconds before date 1.
It's awesome
I have been fiddling with the idea of making user defined functions in ez-script. It would be a control where you can define the function and parameters.
My first thought was to make the function be ez-script. But lately i've been leaning toward the idea of having the function be c# to give additional functionality. That means you could create the c# code for the internal function and be a) extra fast b) have control over the ARC architecture just like a plugin
@DJ... Great idea.... User defined functions would be awesome....
@DJ,
I'm glad you raised that topic.
Plugin: the concept is neat, but as you know does not work on Mobile and Windows Universal Apps
user functions: I would do it first in EZ-Script, as you know C# CodeDom/Generation is not allowed on IOS Apps.
that way you can use user functions everywhere.
I was thinking of the user function being similar to a plugin's version management and shareable in an online library.
if the function is a mere EZ-Script and defined on a per project basis, there would be no version control and outdated/bugger functions would be difficult to manage across projects.
I'll think a bit on what an EZ-Script user function with online version management simlar to a plugin would look like. hmmm...
While we're on the topic... (and assuming I got the gist of this function idea).... A function or library for serial would be great... I am just ok at serial stuff, but streamlining serial receive would be welcome...
@Richard R,
Can you elaborate.
@PTP.... I would like to just read serial into a variable in a function call... avoiding GetByteAt, UARTAvailable, UARTRead, etc....
And maybe even a simple parser... $string=(left($string),10,5) Something like this would set $string as the 10th character in and read for 5 characters after.... This way you can pick the data you want out of the incoming serial data
How would you know if any data had been transmitted, how to tell if a packet had been received without UartAvailable()?
Why are you ever GetByteAt() anyway? That's not a serial specific function - it's a function to get a byte(character) within a string