...approach or does anyone know a better way? An example of the C code is below.
static void
aaha_aux (
double lt,
double x, double y,
double *p, double *q)
{
static double last_lt = -3434, slt, clt;
double cap, B;
if (lt != last_lt) {
slt = sin(lt);
clt = cos(lt)...
I'm playing with async TCP to communicate between two applications. I'm having a heck of a time trying to figure out how actually be able to use TCP messages. Using an async callback I can receive messages but since the method is static I can't access it or call non static methods from it - so...
I didn't realize each resx file was compiled into a separate dll, I thought they were rolled into the program binary. Well that solves that problem.
Now I just have to figure out how to get inno installer to include them. Should be pretty simple.
thanks!
Just started getting into adding different languages for an app, just en-US and fr-CA so far but I'm already realizing that I really want the words/phrases in a text file so changes and corrections can be made without having to re-compile. Should I just dump the Globalization string handling and...
Ooh, I do have a real related question!
When I've added a child namespace as above (I2CCmd) I have to preface the actual commands (I2CReadByte() etc) with the class name. I want to get around having the double I2C bit I2CCmd.I2CReadByte() which I could do by making each actual command a class...
On a related note. Is there a simple way to pass a list of bytes to a method? I noticed in the shared library (I think it's just C) you could pass bytes using curly braces and the receiver would automatically treat that as an array of bytes. Like this pseudocode (don't know C sytnax)...
...so no chance to try it yet.
Looks like if I'm going to make a wrapper for pigpio then I'll have to make wrappers for all the methods that use char* as well. Maybe have the programmer supply an array of bytes then in the method wrapper do the conversions to strings and then finally to the...
I have to send byte values to a C dll that is expecting char* which is apparently not allowed. Did some searching and I'm supposed to replace the char* with [MarshalAs(UnmanagedType.LPStr)] string myBytes
That's all fine but I'm trying to figure out how to create a string from a byte array in a...
I tried it out and it produces pretty nice docs. There's no "home" page in the output but I imagine that's because I'm supposed to load it via a special viewer of some sort. Didn't get that far into it last night as I found out the MS version was abandoned and now it's open source. I grabbed the...
Yes, got all my "///" auto comments all filled out. Always do that as I go along so it doesn't really feel like so much like I'm "documenting" rather than coding.
...what you think are well done code documenting Wiki examples.
I was thinking of dividing the docs by namespace, which would produce a TOC like:
* PiIO
* GPIO
* I2C
* SPI
.. etc
Where clicking on one of the links would show everything in that part of the namespace like Methods...
Yep. For some reason my brain just can't figure these things out until I write it out in a post then a couple of minutes later I've figured it out.
I added a namespace I2C and renamed the I2C class to I2CCmd. Now I can add namespaces and classes the way I wanted to.
Actually I just realized something. I'm thinking of I2C as a namespace when it's actually a class inside TheHardware. That's probably the root of my problems.
I'm probably searching with the wrong terms or maybe just not recognizing the answer when I see it.
I've got existing namespaces like
TheHardware.I2C
And I want to add classes to I2C like this
TheHardware.I2C.Devices
Then eventually like
TheHardware.I2C.Devices.Temperature...
Oh duh! After hours of fruitless searching I stumbled on the Oh Too Simple answer. After adding a reference to the project make the classes you want to appear PUBLIC and then it'll show up.
I was looking for something complexity that doesn't exist apparently.
I've been googling but obviously I just don't know the right terms to use to get to step one in learning the subject.
What I want to do is make my classes show up as children of a root namespace the way Diagnostics appears as a child of System. I've been staring at a solution that does this but...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.