Jump to content

razark

Members
  • Posts

    3,340
  • Joined

  • Last visited

Everything posted by razark

  1. Squad should spend their time in a mixed way: They should put a priority on fixing the specific bugs that affect me, as well as adding or revamping parts I like to use. Spending any time working on any other bugs or parts is a complete waste of time, and Squad should stop squandering resources in any way that doesn't directly benefit me and my playstyle!
  2. I've never worked with Arduinos before. I've been thinking of picking one up, though. I like the Pi, because I can use python on it. Just remember, you could be working in assembly. (Or COBOL. I hated that class. Loved the professor, though.)
  3. There's one of the reasons I've turned to Python more and more. You could use chars. Literally use '.', '-', ' ', and '_' or '/'.
  4. Not sure what you're trying to say here. Why haul these capsules all the way to Mars and back? Bring the crew up, drop the capsules, go to Mars, come back, send up new (or refurbished) capsules to return the crew.
  5. razark

    The Question?

    The original trilogy and Rogue One, I like. The prequels, not so much. Especially I. Long wait, too much overhyping, not worth it. VII was alright, but a rehash of IV. VIII wasn't even a Star Wars movie. I'm not sure what it was.
  6. 3 Pis running Raspbian versions 1 (ex)laptop running CentOS
  7. Oh, please no. I'd rather have the ability to just select three or four pilots, rather than having to edit the save file. Also, the candidate list should refresh more often, so I don't have to delete all of them out of the file so I can get a fresh selection.
  8. Please explain in detail what problems you're having when using this with 1.5, so that we can help you.
  9. "From space I saw Earth -- indescribably beautiful and with the scars of national boundaries gone." -Muhammad Faris "When you're finally up at the moon looking back on earth, all those differences and nationalistic traits are pretty well going to blend, and you're going to get a concept that maybe this really is one world and why the hell can't we learn to live together like decent people." -Frank Borman "I really believe that if the political leaders of the world could see their planet from a distance of 100,000 miles their outlook could be fundamentally changed. That all-important border would be invisible, that noisy argument silenced. The tiny globe would continue to turn, serenely ignoring its subdivisions..." -Michael Collins "The first day or so we all pointed to our countries. The third or fourth day we were pointing to our continents. By the fifth day, we were aware of only one Earth." -Sultan bin Salman Al-Saud Some benefits aren't measured with dollar signs.
  10. It was probably just a teaser.
  11. @0111narwhalz I had my head so wrapped in the morse part of it, I completely glossed over other encoding methods. Then you referred to dits and dahs in your initial explanation, that I completely lost what you were saying. I can tell it has problems, but I haven't looked at it long enough yet. On first glance, let's take 'E' as an example. You receive a dot, the letter E in morse. You enter the switch, and you reach index = 2 * index + 2; index is 0, therefore index * 2 is also zero. Add 2, and you get 2. This points to the letter 'i' in your tree. The same happens with the dash, index = 2 * index + 3; Basic math says you'll never get indexes 0 or 1. I think you might need to leave of the addition?
  12. Perhaps I'm not understanding how you are encoding here. 00 = ·· = I11 = ·· = I10 = ·-· = R01 = ·-· = R So, how do you encode C as -.-. or K as -.- ? Edit: Are we talking about encoding the timing?
  13. That's why. It's samples of the working code and such. The same reason there's no #include <whatever.h> or function definitions or int main(void){ } included.
  14. Floppy? You lot had it easy with your floppies and your screens! I was writing BASIC on cassette tapes hoping I remembered to note down the counter when I hit record on the tape deck! And wait for dad to stop using the black and white TV so we could switch it to channel three and plug in the computer! *wanders off to shake his cane at those meddlesome kids on his lawn*
  15. A couple of changes. A: instead of passing the index, you can just pass the character you wish to encode. void MorseEncoder(char input) //in the complete version this would assign all characters in the alphabet (maybe even numbers, punctuation, who knows) { switch (input) { case 'A': case 'a': send_dit(); send_dah(); send_space(); break; case 'B': case 'b': sent_dah(); sent_dit(); sent_dit(); sent_dit(); sent_space(); break; //and so on } } B: Instead of having the strlen() call every loop, do it once, before entering. (Optimizing compilers probably handle this, but why take the chance. You never know when you might need to do it yourself, or when you might be working on old systems. Build good practice into your habits where possible.) limit = strlen(String); for (int i = 0; i < limit; i++) { MorseEncoder(String[i]); //Call the function. That should take care of literally everything else. }
  16. should be for (i = 0; i < strlen(String); i++) which will break out of the loop when i is equal to the length of the string. The way you have it written, it will assign the length - 1 to the variable i. And This will not do what you want it to. (Wait. I'm not sure what it would evaluate to...) i++; will suffice. You don't need the assignment, since it will already increment i.
  17. All I see missing is the loop, otherwise, yes, I think it should do what you think it will do. I've felt that exact same feeling when I look at code I wrote a year before. Depending on what you're trying to do, a Raspberry Pi could be good. It's cheap, takes up no room, you can use a small SD card and make multiple different installs and switch them out easily, and make backups in case you break things, so it takes the fear out of trying something you don't quite fully understand.
  18. Better that than like "banana".
  19. Indeed. It's still stuck in my head to avoid strings after... 23 years.
  20. Yeah. The professor went so far as to say something like "Strings do not exist in C. Do not even bother asking about string functions."
  21. The switch statement would be used in exactly the same place as the repeated if statements you had. They're pretty much identical in flow control in most uses. I just tend to find switch a bit easier for my reading. The string of if statements does have a downside if you do not have a return inside the if. If your character is 'A', you'd end up doing 26 comparisons with the 'if' method (without returns). With the switch, it'll hit the break and stop running the comparisons. Because you're not always going to have a return inside the if, I find it better to use the switch as general practice.
  22. Step one complete. Step two: Repeat step one ad infinitum.
×
×
  • Create New...