<dhewg>
in ucode, how do I check a value against NaN?
<dhewg>
ucode -e 'let i = NaN; warn(i, i == NaN, i != NaN, "\n");'
<dhewg>
like, what?
dansan has quit [Server closed connection]
dansan has joined #openwrt-devel
Obi-Wan has quit [Server closed connection]
Obi-Wan has joined #openwrt-devel
GNUmoon has quit [Server closed connection]
GNUmoon has joined #openwrt-devel
<dhewg>
'type(i) == "double" && !i' works at least
<dhewg>
jow: is that ^ intentionally?
borek has joined #openwrt-devel
jow has quit [Server closed connection]
jow has joined #openwrt-devel
borek has quit [Ping timeout: 480 seconds]
arnd has quit [Server closed connection]
arnd has joined #openwrt-devel
<dhewg>
i!=i as per the definition of nan I guess?
goliath_ has joined #openwrt-devel
jayk_ has joined #openwrt-devel
jayk has quit [Read error: Connection reset by peer]
goliath has quit [Ping timeout: 480 seconds]
yolo has quit [Server closed connection]
yolo has joined #openwrt-devel
PaulFertser has quit [Server closed connection]
PaulFertser has joined #openwrt-devel
goliath_ has quit []
G10h4ck has quit [Server closed connection]
<jow>
dhewg: yes, x != x works for detecting nan
dangole has quit [Remote host closed the connection]
dangole has joined #openwrt-devel
clayface_ has quit [Server closed connection]
<jow>
dhewg: it follow js semantics (it yields NaN/false/true as well for the same tests)
clayface has joined #openwrt-devel
<jow>
dhewg: so function isNaN(x) { return x != x }
<dhewg>
yeah, thx, doing that now. is it woth adding isNaN to the math lib, which uses isnan() from the c math lib?
<dhewg>
or is x!=x equal to that?
<jow>
it is equal
<jow>
but I guess I could add a function too
<dhewg>
no matter which type?
<jow>
yep, double nan is the only value/type combination where x!=x yields true
<dhewg>
alright
danitool has joined #openwrt-devel
ptudor_ has joined #openwrt-devel
bluew has quit [Ping timeout: 480 seconds]
<jow>
hm, isnan() function in math raises some more question
<jow>
how should it repond to non-double arguments
opty has quit [Server closed connection]
<jow>
technically they're not numbers either
opty has joined #openwrt-devel
<\x>
dhewg: are those rules on 6g added now? good to try now or nah?
<jow>
but returning false for them as well would render the function useless for the purpose of detecting NaNs
<jow>
returning "true" on math.isnan("foobar") falls wrong tho
<jow>
*feels
<jow>
erm returning false
robimarko has joined #openwrt-devel
ptudor has quit [Ping timeout: 480 seconds]
<dhewg>
\x: if you mean preventing incompatible encryption modes, that's still open
<dhewg>
jow: if you get true for everything not double that'll render the function rather useless
<dhewg>
there's the check for "Infinity", which works nicely
<\x>
dhewg: then how about the stability of your new AC1300 AP becoming an AX4300 one? weirdly enough its real stable on ipq40xx atleast when I ran it for a day or so, hbu?
<dhewg>
\x: no crashes or issues so far on ipq4019. in fact I'm using it as the primary wifi for my notebook
<dhewg>
better reception, but mainly because it's less crowded
<dhewg>
jow: does it make sense to add other typechecks a la isstring() too? doing that as string comparison in ucode feels weird
<jow>
hm
<jow>
will consider it, although it feels like bloat to me
<jow>
if you only want to check against one type, a dedicated isX() function is slightly more efficient
<jow>
if you want to test multiple (e.g. int or double) you've get additional call overhead
<dhewg>
I'm not a js guy, so maybe it just feels less efficient than it really is
Guest67 is now known as ynezz
goliath has joined #openwrt-devel
Borromini has joined #openwrt-devel
Nyshan has quit [Remote host closed the connection]
MaxSoniX has quit [Quit: Konversation terminated!]
MaxSoniX has joined #openwrt-devel
<dhewg>
and maybe it's because of my lack of js knowledge, but I found "export default", "==>", "...args" and it's not documented what exaclty those do
<stintel>
I guess this will have to do for my hackery
<stintel>
or maybe I can --start-number=9990 or so
<stintel>
just need my hack patches to be applied last
<jow>
dhewg: yeah, always template mode. LuCI uses a small toplevel "template" which then simply requires/imports the entire rest which then runs in raw mode
<aiyion>
Good day everyone. Got the Wavlink router working yesterday; I think the dts is complete now.
<aiyion>
One problem is my partition offset for the rootfs, which leads to missing eraseblock boundaries, which in turn lead to read only mount: https://bpa.st/CREA
MaxS0niX has quit [Read error: Connection reset by peer]
MaxS0niX has joined #openwrt-devel
goliath has quit [Quit: SIGSEGV]
soxrok2212_ has joined #openwrt-devel
soxrok2212 has quit [Ping timeout: 480 seconds]
bluse-blue[m] has quit [Server closed connection]
bluse-blue[m] has joined #openwrt-devel
<aiyion>
stintel: I think I'm doing it wrong. I've been recommended a relocate function from nbd's staging tree by a friend; not sure how problematic or helpful that is.
<stintel>
relocate is to relocate in memory afaik, nothing to do with flash layout
<aiyion>
Using kernel-relocate instead appears to be working
soxrok2212 has joined #openwrt-devel
soxrok2212_ has quit [Ping timeout: 480 seconds]
goliath has joined #openwrt-devel
niyawe has quit [Server closed connection]
niyawe has joined #openwrt-devel
<hgl>
anyone knows what does `proto_set_keep 1` do in netifd when the dev is managed externally? from the source code, it seems it means netifd would skipping updating the device's ip address, but I can't be sure.
valku has joined #openwrt-devel
G10h4ck has joined #openwrt-devel
<schmars[m]>
I'm trying to programmatically extract vars such as IMAGE_SIZE per device. Any ideas? :)
<schmars[m]>
I've seen something like `make -C target/linux/and-so-on val.FOO` used but cant that to work
<aiyion>
it is okay to introduce a variant of a device before the regular one, correct?
<schmars[m]>
aiyion: there are a lot of devices that are supported fine but where e.g. the first revision had a completely different SoC that's unsupported, so my hunch would be yes absolutely
<aiyion>
what I mean is, Wavlink produced the "WN572HP3" a mediocre dualband device for outdoor usage.
<aiyion>
Afterwords they introduced a vraint, that came with a 4G modem.
srslypascal is now known as Guest387
srslypascal has joined #openwrt-devel
<aiyion>
I'd like to know if I can add it as variant in the Makefile, even though the regular device does not exist there yet.
<aiyion>
Adding support should be as easy as dropping everything 4G related, but I have nothing to test it on.
<schmars[m]>
Go for it i'd say. If you want to know how to do variants, check out the old tp-link wr802 or archer c7/a7
<aiyion>
schmars[m]: Looks like that does not work; make menuconfig denies setting the model.
<aiyion>
Looks like I add the device as if it was actually called `4g` at the end, and whenever somebody adds the regular, my addition gets moved around.
<schmars[m]>
i haven't done a device myself yet to be honest, so i can't really help :-)
Tapper has quit [Ping timeout: 480 seconds]
<aiyion>
Got it. Missed a reference earlier. Works like a charm.
<aiyion>
Now all that's left is cleaning up git and test it a little more.
linusw has quit [Quit: Connection closed for inactivity]
tlj_ has joined #openwrt-devel
tlj has quit [Ping timeout: 480 seconds]
floof58 is now known as Guest398
floof58 has joined #openwrt-devel
Guest398 has quit [Ping timeout: 480 seconds]
<aiyion>
Where do I find sensible values for spi-max-frequency?
<aiyion>
I currently run at 40MHz, but feel like it could do more. Is there a better way, than trial and error up to the value in the datasheet of the spi-chip?
<aiyion>
"104MHz Standard and Dual SPI"
<aiyion>
"80MHz for Quad SPI and QPI"
<slh>
aiyion: it's a mixture of checking what the OEM firmware does (lower ceiling), what the chip specs say (upper ceiling), personal testing (floating somewhere in the middle) - just be aware that other users might have gotten worse boards, so what works on yours, might not work reliably on yours
<slh>
s/yours$/theirs/
<aiyion>
oem did 40MHz, that's why used it as a starting point.
<slh>
40 MHz isn't too bad, I probably would stick to that
<aiyion>
GigaDevice 25Q128ESIG3
<aiyion>
Mhm. okay. Thank you.
<slh>
we've seen quite a few devices recently where the frequency had to be dropped later, as the higher figures weren't working for everyone
<aiyion>
If I read the datasheet correctly 80MHz is the lowest figure, for a special read call.
<slh>
there are obviously some cases where the OEM vendor didn't care and just set the minimum frequency, there it makes sense to try and test what's possible. but if the vendor has come up with a 'reasonable' frequency, they might have done the testing (over larger batches of boards) already