Merge pull request #428 from adrianVmariano/master

This commit is contained in:
Revar Desmera 2021-02-20 16:27:12 -08:00 committed by GitHub
commit 73af7ea116
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -310,7 +310,9 @@ function _screw_info_english(diam, threadcount, head, thread, drive) =
[2, [ 3, 1.5, undef, undef, undef]],
],
entry = struct_val(UTS_socket, diam),
hexdepth = is_def(entry[3]) ? entry[3] : if_def(diam) ? diam/2 : undef,
hexdepth = is_def(entry[3]) ? entry[3]
: is_def(diam) ? diam/2
: undef,
drive_size = drive=="hex" ? [["drive_size",inch*entry[1]], ["drive_depth",inch*hexdepth]] :
drive=="torx" ? [["drive_size",entry[2]],["drive_depth",inch*entry[4]]] : []
)