Jump to content

MoominPapa

Member
  • Posts

    5,600
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by MoominPapa

  1. I fear the tender tank may be frozen.... MP.
  2. The little microcontroller-based component testers cheap from China are worth having, eg https://www.ebay.co.uk/itm/All-in-1-Component-Tester-Transistor-Diode-Capacitor-Resistor-Inductor-MeterLDSC/383846920912 MP.
  3. I used to be able to look at most resistors and instantly know the value, but modern metal film resistors are accurate enough that they all have values to three significant digits, rather the two on the old type, and that somehow stops them looking right. The fact that there's an extra band and the resistors are tiny so the bands are small and my eyes ain't what they were is probably not helping either. MP.
  4. Taybrite is not good, I'll admit, but don't you know there's a bloody pandemic on? We gets what we can when we can these days. MP.
  5. Just another few bags of Taybrite, and we'll be there. MP.
  6. I've been shovelling it in like the fireman of the Flying Scotsman. If we left Kings Cross back in October, we must be getting close to Doncaster by now. MP.
  7. This post cannot be displayed because it is in a forum which requires at least 10 posts to view.
  8. This post cannot be displayed because it is in a forum which requires at least 10 posts to view.
  9. This post cannot be displayed because it is in a forum which requires at least 10 posts to view.
  10. This post cannot be displayed because it is in a forum which requires at least 10 posts to view.
  11. This post cannot be displayed because it is in a forum which requires at least 10 posts to view.
  12. This post cannot be displayed because it is in a forum which requires at least 10 posts to view.
  13. Kelvin in the only true temperature unit. I used to mix and match units as convenient. Since the Vera Lynn Fetishists co-opted units for political purposes (Metric Martyrs, etc) , I try and stick to Systeme Internationale units exclusively. MP.
  14. _host_to_network_long_ _host_to_network_short etc, etc. On bigendian machines they are no-operations, so developing network software on a little endian machine means you find out immediately if forgot one. Bit addressing is just the generalisation of byte addressing. In a 64 bit architecture, you can load a single byte from any address, but the memory is accessed via a 64 bit bus, so you need hardware to shuffle any set of 8 bits on the bus to the low 8 bits, since the 8 bits you want are the low 8 bits only for byte addresses divisible by 8. Bit addressing just expands this to a complete barrel shifter, and most CPUs have one of these in the ALU anyway (ARM has had one since the very first implementation.) Byte addressed machines need addressing modes with fast multiply-by-8 so make accesses to long words arrays fast (the address of the nth word of an array of long words is <array base> + (n * 8), since a long is 8 bytes long.) Moving to bit addressing is just the same, by multiply by 64 instead of multiply by 8. Word addressing means that you can't easily create a pointer to anything smaller than a whole word, which is a disaster for C, which uses pointers to characters/bytes EVERYWHERE. MP.
  15. Little endian is the way to go. It makes it simple to dereference a point to an object as a smaller size and gets the same result as truncating it. The big mistake was byte addressing. The move to 64 bit machines should have been the time to move to bit addressing, with every bit having its own address. There's plenty of address space to do that. The only problem with little endian is that network byte order is big endian. But at least that means you notice if theres an htonl() or htons call missing somewhere. MP.
  16. Free me from the 'rona and brexit, but leave me my boating and my hex. MP.
  17. As long as you do it by calculating (now - start > interval). It's tempting to calculate (now > start + interval) but that gives the wrong answer in the case that 1) start + interval has not rolled over, but now has rolled over, start+interval will be a large positive number, but now will be a small positive number, so you'll think the delay has not completed, even when it has. MP.
  18. The calculation currentMillis - previousMillis is actually done modulo 2^32, since the variables are unsigned long, which is 32 bits on Ardunio. PreviousMillis is close to rollover, say r milliseconds from rollover, so it's (2^32)-r and currentMillis has rolled over and is now a small number s milliseconds after rollover. So currentMillis - previousMillis is s+r-(2^32), but since the calculation is modulo 2^32, subtracting (or adding) 2^32 is an identity, it doesn't change the result at all and the actual value is s+r. That's exactly what we want for the number of milliseconds since previousMillis, as it's the number of milliseconds before rollover plus the number of milliseconds after rollover. MP.
  19. The second half of that boolean (currentMillis < previousMillis) is not necessary and will cause bad timing during rollover. In C over/underflow of arithmetic operations is defined for unsigned integers, and after a rollover thevalue currentMillis will become small, whilst previousMillis will be large, so the subtraction will underflow, resulting in a correct value even in that situation. MP.
  20. I'm very envious. Partly of the enormous fun you're clearly having, but mainly because your lives are not on hold because of the 'Rona. Such a pity we have failed as a nation where NZ succeeded. MP. ETA I have been following the (re)build of the sailing Yacht Tally Ho on Youtube with great interest. https://www.youtube.com/channel/UCg-_lYeV8hBnDSay7nmphUA
  21. Not that close to Braunston, sorry, but the dry-dock in Northwich has high enough bostocks to get underneath and black the bottom. They do DIY (and supply a nifty trolley to lie on a wheel yourself underneath) or full service including collection and delivery if you want. No connection other than a satisfied customer. http://www.northwichdrydock.com/ MP.
  22. Ordinary folk shouldn't ever see them: they're low-level kernel errors that should be dealt with long before they ever get to a user. MP.
  23. Dunno about Atari. There is the famous "printer on fire" message in Unix https://en.wikipedia.org/wiki/Lp0_on_fire. and it was a sad day when the historic unix error "Is not a typewriter" was changed to "Inappropriate ioctl for device". The programming symbol is still ENOTTY though. MP.
  24. As someone who's code runs (as root) on every Android phone in the world, and half the cheap plastic home routers, I can confirm that, in the end, _every_ error message will turn up. Probably in an email when you least expect it. MP.
  25. No, you can write code that calculates the _difference_ between two values from millis() and returns the elapsed time between them, even if the millis() value rolled over after the first call to millis() and before the second one. Of course if millis() rolled over more than once between the two calls, all bets are off. That's a non-problem in almost all cases. MP.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.