Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mesecons
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
mesecons
Commits
931ac23f
Commit
931ac23f
authored
12 years ago
by
cornernote
Committed by
Anthony Zhang
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Improve T-FF code and add a reset pin on C.
parent
dcd2f94b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mesecons_microcontroller/init.lua
+3
-4
3 additions, 4 deletions
mesecons_microcontroller/init.lua
with
3 additions
and
4 deletions
mesecons_microcontroller/init.lua
+
3
−
4
View file @
931ac23f
...
...
@@ -81,7 +81,7 @@ minetest.register_node(nodename, {
elseif
fields
.
bnand
then
fields
.
code
=
"sbi(C, !A|!B) :A and B are inputs, C is output"
elseif
fields
.
btflop
then
fields
.
code
=
"if(A)sbi(1,1);
if(!A
&B)off(
B)sbi(1,0); if(
!A&!B)on(B)sbi(1,0
); :A is input, B is output (Q), toggles with falling edge"
fields
.
code
=
"if(A)sbi(1,1);if(!A
)sbi(B,!
B)sbi(1,0); if(
C)off(B,1
); :A is input, B is output (Q),
C is reset,
toggles with falling edge"
elseif
fields
.
brsflop
then
fields
.
code
=
"if(A)on(C);if(B)off(C); :A is S (Set), B is R (Reset), C is output (R dominates)"
elseif
fields
.
program
or
fields
.
code
then
--nothing
...
...
@@ -171,9 +171,8 @@ function yc_code_remove_commentary(code)
is_string
=
false
for
i
=
1
,
#
code
do
if
code
:
sub
(
i
,
i
)
==
'"'
then
is_string
=
(
is_string
==
false
)
--toggle is_string
end
if
code
:
sub
(
i
,
i
)
==
":"
and
is_string
==
false
then
is_string
=
not
is_string
--toggle is_string
elseif
code
:
sub
(
i
,
i
)
==
":"
and
not
is_string
then
return
code
:
sub
(
1
,
i
-
1
)
end
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment