>
> Thanks for the reply. (For some reason, I didn't get a notification from
> google groups so I had to do some searching just to find my own message!)
>
> I'll look into following your suggestion. I'm not too savvy on device
trees, so it'll be a learning experience.

If you're decent with javascript it should not be too much of a big deal to
fix. I can not think of the filename offhand in which the different library
functions are in. Perhaps Jason K can chime in. But if I think is going on
is true, it'll be in a callback looking something like:

exports.export_name = function(param, callback){

    var params = param;
    var some_function = node_function( params, (error, param2, param3) => {
        *if(error){throw error;}*

        callback(param3);
    });
};

I know . . . thats rather generic. But last I looked at bonescript it was
rather complex and very involved. In some cases, I think it even includes
the kitchen sink ;)



On Thu, Sep 8, 2016 at 12:20 PM, Todd Hitt <[email protected]> wrote:

> Thanks for the reply. (For some reason, I didn't get a notification from
> google groups so I had to do some searching just to find my own message!)
>
> I'll look into following your suggestion. I'm not too savvy on device
> trees, so it'll be a learning experience.
>
>
> On Monday, September 5, 2016 at 5:08:10 PM UTC-4, William Hermans wrote:
>>
>> What i mean by the above is that the library seems as though it does load
>> the device tree, or export the ADC pin correctly. But it's still sending
>> the exception message to stderr, and then halting the application for some
>> odd reason.
>>
>> I'd have to read the code to be 100%, but right now I do not have the
>> time. . .
>>
>> On Mon, Sep 5, 2016 at 2:03 PM, William Hermans <[email protected]> wrote:
>>
>>> Yeah it sound like bonescript, or the newer refactored version may not
>>> correctly handle the "file does not exist" exception correctly. As it
>>> currently sits.
>>>
>>> Ideally, in code you would check that the file you're about to use
>>> exists, and if it does not then you load the appropriate device tree file,
>>> or similar, then just carry on about your marry way. Silently.
>>>
>>> On Mon, Sep 5, 2016 at 11:02 AM, Todd Hitt <[email protected]> wrote:
>>>
>>>> Hello all,
>>>>
>>>> I have a problem that mystifies me. After I boot my BB, the first time
>>>> I try to issue an analogRead via node.js, I get the following error:
>>>>
>>>> fs.js:549
>>>>   return binding.open(pathModule._makeLong(path),
>>>> stringToFlags(flags), mode);
>>>>                  ^
>>>>
>>>> Error: ENOENT: no such file or directory, open
>>>> '/sys/bus/iio/devices/iio:device0/in_voltage0_raw'
>>>>     at Error (native)
>>>>     at Object.fs.openSync (fs.js:549:18)
>>>>     at Object.fs.readFileSync (fs.js:397:15)
>>>>     at Object.exports.readAIN (/var/lib/cloud9/node_modules/
>>>> bonescript/src/hw_mainline.js:211:30)
>>>>     at Object.f.analogRead (/var/lib/cloud9/node_modules/
>>>> bonescript/src/index.js:271:19)
>>>>     at null._repeat (/var/lib/cloud9/autorun/app.js:86:13)
>>>>     at wrapper [as _onTimeout] (timers.js:275:11)
>>>>     at Timer.listOnTimeout (timers.js:92:15)
>>>>
>>>>
>>>> When I run my app again, immediately without changing anything else, it
>>>> works fine.  Any ideas?
>>>>
>>>> Thanks in advance.
>>>>
>>>> --Todd
>>>>
>>>> --
>>>> For more options, visit http://beagleboard.org/discuss
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "BeagleBoard" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>>> gid/beagleboard/7c5a641a-57b7-44c6-9498-bcbd809550d4%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/beagleboard/7c5a641a-57b7-44c6-9498-bcbd809550d4%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/beagleboard/4ed8d597-5071-448b-8d06-4f032ed24af5%40googlegroups.com
> <https://groups.google.com/d/msgid/beagleboard/4ed8d597-5071-448b-8d06-4f032ed24af5%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALHSORr9%3DAR%2Bq3q%2Bzsfmo1ysWcLqQz%2Bic7kpC_ghyEmeHg5t6A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to